From 91b1f9eee9729fc9845eaecdad88a7a5050a33de Mon Sep 17 00:00:00 2001 From: "Guillaume J. Charmes" Date: Sun, 31 Mar 2013 22:42:10 -0700 Subject: [PATCH] Avoid destroy() timeout by closing stdin in TestStart() --- container_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/container_test.go b/container_test.go index 45d334ca22..571a093767 100644 --- a/container_test.go +++ b/container_test.go @@ -263,6 +263,10 @@ func TestStart(t *testing.T) { if err := container.Start(); err == nil { t.Fatalf("A running containter should be able to be started") } + + // Try to avoid the timeoout in destroy. Best effort, don't check error + cStdin, _ := container.StdinPipe() + cStdin.Close() } func TestRun(t *testing.T) {