From e4c60e1e6204e0b191afd03069c8732529dbd4a0 Mon Sep 17 00:00:00 2001 From: Alessandro Ros Date: Mon, 12 Jan 2026 21:46:48 +0100 Subject: [PATCH] tests: fix race condition (#5338) --- internal/protocols/hls/to_stream_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/protocols/hls/to_stream_test.go b/internal/protocols/hls/to_stream_test.go index 71e5e287..4040d0f0 100644 --- a/internal/protocols/hls/to_stream_test.go +++ b/internal/protocols/hls/to_stream_test.go @@ -121,8 +121,10 @@ func TestToStream(t *testing.T) { medias[0], medias[0].Formats[0], func(u *unit.Unit) error { - require.Equal(t, time.Date(2018, 0o5, 20, 8, 17, 15, 0, time.UTC), u.NTP) - close(done) + if !u.NilPayload() { + require.Equal(t, time.Date(2018, 0o5, 20, 8, 17, 15, 0, time.UTC), u.NTP) + close(done) + } return nil })