Merge pull request #2454 from hashicorp/b-fix-gc-test
Fix test deadlock due to alloc runner not running
This commit is contained in:
commit
ba674adc38
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue