mirror of https://github.com/docker/docs.git
Merge pull request #301 from dotcloud/container_test_improvment-1
Avoid destroy() timeout by closing stdin in TestStart()
This commit is contained in:
commit
9e81ab65cb
|
@ -263,6 +263,10 @@ func TestStart(t *testing.T) {
|
||||||
if err := container.Start(); err == nil {
|
if err := container.Start(); err == nil {
|
||||||
t.Fatalf("A running containter should be able to be started")
|
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) {
|
func TestRun(t *testing.T) {
|
||||||
|
|
Loading…
Reference in New Issue