diff --git a/components/engine/container_test.go b/components/engine/container_test.go index 571a093767..ac47f84bf0 100644 --- a/components/engine/container_test.go +++ b/components/engine/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/components/engine/runtime_test.go b/components/engine/runtime_test.go index 80c455070d..9ab8b9b1e7 100644 --- a/components/engine/runtime_test.go +++ b/components/engine/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 }