diff --git a/container_test.go b/container_test.go index 571a09376..ac47f84bf 100644 --- a/container_test.go +++ b/container_test.go @@ -267,6 +267,7 @@ func TestStart(t *testing.T) { // Try to avoid the timeoout in destroy. Best effort, don't check error cStdin, _ := container.StdinPipe() cStdin.Close() + container.WaitTimeout(2 * time.Second) } func TestRun(t *testing.T) { diff --git a/runtime_test.go b/runtime_test.go index 80c455070..9ab8b9b1e 100644 --- a/runtime_test.go +++ b/runtime_test.go @@ -315,7 +315,7 @@ func TestRestore(t *testing.T) { // Simulate a crash/manual quit of dockerd: process dies, states stays 'Running' cStdin, _ := container2.StdinPipe() cStdin.Close() - if err := container2.WaitTimeout(time.Second); err != nil { + if err := container2.WaitTimeout(2 * time.Second); err != nil { t.Fatal(err) } container2.State.Running = true @@ -359,4 +359,5 @@ func TestRestore(t *testing.T) { if err := container3.Run(); err != nil { t.Fatal(err) } + container2.State.Running = false }