From 33f46460dc1ef6e8846b37ebdc78526d93cf8d62 Mon Sep 17 00:00:00 2001 From: zarazaex69 Date: Thu, 28 May 2026 13:19:14 +0300 Subject: [PATCH] test(e2e): tune videochannel params and reduce chunk timeout --- internal/e2e/stress_test.go | 10 ++++------ internal/e2e/tunnel_test.go | 8 ++++---- internal/engine/goolom/signaling.go | 6 ++++++ internal/transport/videochannel/gocodec.go | 4 ++-- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/internal/e2e/stress_test.go b/internal/e2e/stress_test.go index c966949..fb1b9fd 100644 --- a/internal/e2e/stress_test.go +++ b/internal/e2e/stress_test.go @@ -212,12 +212,10 @@ func streamPatternForDuration(conn net.Conn, duration time.Duration, chunkSize i if chunkSize <= 0 { chunkSize = 4096 } - // Per-chunk roundtrip deadline. Videochannel uses per-fragment acks - // with up to 20 retransmit attempts; during SFU renegotiation frames - // can be lost for several seconds, triggering the full retransmit - // cycle (~40s worst case). 45s covers that while still catching - // genuine stalls within a reasonable time. - const chunkTimeout = 45 * time.Second + // Per-chunk roundtrip deadline. Slow transports (videochannel) can + // take seconds+ per chunk in practice; 15s gives ample margin + // without making genuine stalls hang forever. + const chunkTimeout = 15 * time.Second start := time.Now() deadline := start.Add(duration) diff --git a/internal/e2e/tunnel_test.go b/internal/e2e/tunnel_test.go index 2113594..8dcaedd 100644 --- a/internal/e2e/tunnel_test.go +++ b/internal/e2e/tunnel_test.go @@ -79,7 +79,7 @@ var ( ) realE2ETelemostRoom = flag.String( //nolint:gochecknoglobals // package-level state intentional "olcrtc.real-telemost-room", - "41514917109506", + "02789996238784", "Telemost room URL or id for real e2e", ) realE2EWBStreamRoom = flag.String( //nolint:gochecknoglobals // package-level state intentional @@ -935,12 +935,12 @@ func e2eTransportOptions(transportName string) transport.Options { return videochannel.Options{ Width: 1080, Height: 1080, - FPS: 10, - Bitrate: "1000k", + FPS: 60, + Bitrate: "5000k", HW: videoHWNone, QRSize: 512, QRRecovery: "low", - Codec: "qrcode", + Codec: "tile", TileModule: 4, TileRS: 20, } diff --git a/internal/engine/goolom/signaling.go b/internal/engine/goolom/signaling.go index 3608b98..f7b835e 100644 --- a/internal/engine/goolom/signaling.go +++ b/internal/engine/goolom/signaling.go @@ -127,6 +127,12 @@ func (s *Session) handleCommonMessages(msg map[string]any, uid string) { if _, ok := msg["updateDescription"]; ok { s.sendAck(uid) } + if _, ok := msg["slotsConfig"]; ok { + s.sendAck(uid) + } + if _, ok := msg["slotsMeta"]; ok { + s.sendAck(uid) + } if _, ok := msg["vadActivity"]; ok { s.sendAck(uid) } diff --git a/internal/transport/videochannel/gocodec.go b/internal/transport/videochannel/gocodec.go index d440826..13be0f9 100644 --- a/internal/transport/videochannel/gocodec.go +++ b/internal/transport/videochannel/gocodec.go @@ -81,9 +81,9 @@ func (d *goDecoder) PushSample(sample []byte) error { frame, err := d.dec.Decode(sample) if err != nil { if errors.Is(err, vp8.ErrNoReference) { - return nil // skip inter-frames until keyframe arrives + return nil } - return nil // skip undecodable frames (e.g. from other participants) + return nil } gray := frame.Grayscale() select {