Revert "Revert "audio: No need goroutine for tests""

This reverts commit 62a9bb195c.
This commit is contained in:
Hajime Hoshi 2018-12-28 02:18:16 +09:00
parent 62a9bb195c
commit 7956e0ebbc

View File

@ -71,9 +71,6 @@ func TestGC(t *testing.T) {
p = nil
runtime.GC()
ch := make(chan struct{})
go func() {
defer close(ch)
for i := 0; i < 10; i++ {
got = PlayersNumForTesting()
if want := 0; got == want {
@ -84,7 +81,4 @@ func TestGC(t *testing.T) {
time.Sleep(100 * time.Millisecond)
}
t.Errorf("time out")
}()
<-ch
}