Merge pull request #2454 from hashicorp/b-fix-gc-test

Fix test deadlock due to alloc runner not running
This commit is contained in:
Michael Schurter 2017-03-16 14:34:04 -07:00 committed by GitHub
commit ba674adc38

View file

@ -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)
}