浏览代码

Merge pull request #301 from dotcloud/container_test_improvment-1

Avoid destroy() timeout by closing stdin in TestStart()
Guillaume J. Charmes 12 年之前
父节点
当前提交
9e81ab65cb
共有 1 个文件被更改,包括 4 次插入0 次删除
  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) {