mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
'docker run' in attached mode no longer waits for the process to exit. Take this into account in the tests.
This commit is contained in:
parent
1cc1cb099e
commit
2db358146f
1 changed files with 9 additions and 5 deletions
|
@ -94,11 +94,15 @@ func TestRunDisconnect(t *testing.T) {
|
||||||
<-c1
|
<-c1
|
||||||
})
|
})
|
||||||
|
|
||||||
// Check the status of the container
|
// Client disconnect after run -i should cause stdin to be closed, which should
|
||||||
container := runtime.containers.Back().Value.(*Container)
|
// cause /bin/cat to exit.
|
||||||
if container.State.Running {
|
setTimeout(t, "Waiting for /bin/cat to exit timed out", 2*time.Second, func() {
|
||||||
t.Fatalf("/bin/cat is still running after closing stdin")
|
container := runtime.List()[0]
|
||||||
}
|
container.Wait()
|
||||||
|
if container.State.Running {
|
||||||
|
t.Fatalf("/bin/cat is still running after closing stdin")
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// Expected behaviour, the process stays alive when the client disconnects
|
// Expected behaviour, the process stays alive when the client disconnects
|
||||||
|
|
Loading…
Add table
Reference in a new issue