From 0963b8a7e38eb46b11fa40dda1f8c58c4a0f40bc Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 14 Jul 2024 00:48:18 +0900 Subject: [PATCH] audio: bug fix: players were not finished at TestNonSeekableSource --- audio/audio_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/audio/audio_test.go b/audio/audio_test.go index e71b96724..79519992a 100644 --- a/audio/audio_test.go +++ b/audio/audio_test.go @@ -134,4 +134,10 @@ func TestNonSeekableSource(t *testing.T) { p.Play() p.Pause() + p = nil + runtime.GC() + + // 200[ms] should be enough all the bytes are consumed. + // TODO: This is a dirty hack. Would it be possible to use virtual time? + time.Sleep(200 * time.Millisecond) }