datarhei-dragonfork-core/app/webrtc
Zac Gaetano 8d60cbd333 test(app/webrtc): 5-viewer fanout integration + teardown-hook unit test
TestIntegration_FiveViewerFanout drives the M3 acceptance criterion
in the wide direction: spin up the subsystem, register one process,
attach 5 Pion subscribers in parallel via the real Echo handler,
spray synthetic RTP at the allocated UDP ports, and assert each
subscriber's video + audio track receive at least one packet inside
a 15s window. After onProcessStop, the per-stream peer index must
drain to zero within 3s.

TestSubsystem_TeardownHookFiresOnProcessStop is the unit-level
counterpart — confirms the callback registered via
SetTeardownHook actually fires when a process is torn down, even
without a full Pion handshake.

Together these cover the acceptance language: '5 concurrent viewers,
all error paths correct, clean teardown'.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-03 11:23:55 +00:00
..
ffmpeg_args.go feat(app/webrtc): port allocator + FFmpeg arg builder 2026-04-17 09:52:09 -04:00
ffmpeg_args_test.go feat(app/webrtc): port allocator + FFmpeg arg builder 2026-04-17 09:52:09 -04:00
handler.go feat(app/webrtc): M3 robustness — error matrix, per-stream index, PATCH, CORS 2026-05-03 11:23:55 +00:00
handler_m3_test.go test(app/webrtc): M3 unit tests for error matrix + Register + CORS 2026-05-03 11:23:55 +00:00
handler_test.go feat(app/webrtc): M3 robustness — error matrix, per-stream index, PATCH, CORS 2026-05-03 11:23:55 +00:00
integration_test.go test(webrtc): add M2 integration smoke test 2026-04-17 10:11:34 -04:00
lifecycle.go feat(app/webrtc): broadcast process-stop via SetTeardownHook 2026-05-03 11:23:55 +00:00
lifecycle_test.go feat(webrtc): add app/webrtc subsystem + lifecycle hooks 2026-04-17 10:02:00 -04:00
multiviewer_test.go test(app/webrtc): 5-viewer fanout integration + teardown-hook unit test 2026-05-03 11:23:55 +00:00
portalloc.go feat(app/webrtc): port allocator + FFmpeg arg builder 2026-04-17 09:52:09 -04:00
portalloc_test.go feat(app/webrtc): port allocator + FFmpeg arg builder 2026-04-17 09:52:09 -04:00
subsystem.go feat(app/webrtc): broadcast process-stop via SetTeardownHook 2026-05-03 11:23:55 +00:00