diff --git a/client/client_test.go b/client/client_test.go index 4dfeb20cc..6c8bbe4f1 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -682,9 +682,12 @@ func TestClient_SaveRestoreState(t *testing.T) { c2.allocLock.Lock() for _, ar := range c2.allocs { ar.Destroy() - <-ar.WaitCh() } c2.allocLock.Unlock() + + for _, ar := range c2.allocs { + <-ar.WaitCh() + } } func TestClient_Init(t *testing.T) {