From bf90217e68faabe851037c6060b4695e28193402 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 14 Jul 2024 00:53:58 +0900 Subject: [PATCH] audio: skip TestNonSeekableSource on browsers --- audio/audio_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/audio/audio_test.go b/audio/audio_test.go index 79519992a..f87e804cc 100644 --- a/audio/audio_test.go +++ b/audio/audio_test.go @@ -124,6 +124,10 @@ func (emptySource) Read(buf []byte) (int, error) { } func TestNonSeekableSource(t *testing.T) { + if runtime.GOOS == "js" { + t.Skip("infinite steams in tests cannot be treated well on browsers") + } + setup() defer teardown() @@ -134,8 +138,6 @@ 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?