Merge pull request #6415 from LK4D4/increase_timeout_in_test_attach

Increase time before exit in TestMultipleAttachRestart
This commit is contained in:
unclejack 2014-06-18 00:36:18 +03:00
commit ec0fb311ed
1 changed files with 10 additions and 8 deletions

View File

@ -10,11 +10,19 @@ import (
func TestMultipleAttachRestart(t *testing.T) {
cmd := exec.Command(dockerBinary, "run", "--name", "attacher", "-d", "busybox",
"/bin/sh", "-c", "sleep 1 && echo hello")
"/bin/sh", "-c", "sleep 2 && echo hello")
group := sync.WaitGroup{}
group.Add(4)
defer func() {
cmd = exec.Command(dockerBinary, "kill", "attacher")
if _, err := runCommand(cmd); err != nil {
t.Fatal(err)
}
deleteAllContainers()
}()
go func() {
defer group.Done()
out, _, err := runCommandWithOutput(cmd)
@ -41,11 +49,5 @@ func TestMultipleAttachRestart(t *testing.T) {
group.Wait()
cmd = exec.Command(dockerBinary, "kill", "attacher")
if _, err := runCommand(cmd); err != nil {
t.Fatal(err)
}
deleteAllContainers()
logDone("run - multiple attach")
logDone("attach - multiple attach")
}