diff --git a/client/gc_test.go b/client/gc_test.go index cc3e7aa27..f4fdedfbf 100644 --- a/client/gc_test.go +++ b/client/gc_test.go @@ -117,6 +117,10 @@ func TestAllocGarbageCollector_Collect(t *testing.T) { t.Fatalf("err: %v", err) } + // Fake that ar.Run() exits + close(ar1.waitCh) + close(ar2.waitCh) + if err := gc.Collect(ar1.Alloc().ID); err != nil { t.Fatalf("err: %v", err) }