Prevent race between alloc runners
Block ar1's periodic syncing which could recreate the state file ar2 was destroying.
This commit is contained in:
parent
15952e5d17
commit
ea87091e58
|
@ -405,6 +405,10 @@ func TestAllocRunner_SaveRestoreState_TerminalAlloc(t *testing.T) {
|
|||
t.Fatalf("err: %v", err)
|
||||
}
|
||||
|
||||
// Ensure ar1 doesn't recreate the state file
|
||||
ar.persistLock.Lock()
|
||||
defer ar.persistLock.Unlock()
|
||||
|
||||
// Ensure both alloc runners don't destroy
|
||||
ar.destroy = true
|
||||
|
||||
|
|
Loading…
Reference in a new issue