Browse code

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

Guillaume J. Charmes authored on 2013/04/01 14:42:10
Showing 1 changed files
... ...
@@ -263,6 +263,10 @@ func TestStart(t *testing.T) {
263 263
 	if err := container.Start(); err == nil {
264 264
 		t.Fatalf("A running containter should be able to be started")
265 265
 	}
266
+
267
+	// Try to avoid the timeoout in destroy. Best effort, don't check error
268
+	cStdin, _ := container.StdinPipe()
269
+	cStdin.Close()
266 270
 }
267 271
 
268 272
 func TestRun(t *testing.T) {