Browse Source

Avoid destroy() timeout by closing stdin in TestStart()

Guillaume J. Charmes 12 years ago
parent
commit
91b1f9eee9
1 changed files with 4 additions and 0 deletions
  1. 4 0
      container_test.go

+ 4 - 0
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) {