mirror of
https://github.com/moby/moby.git
synced 2025-07-29 07:21:35 +03:00
fix #12188 integration-cli: tests using "sleep" can timeout too early - change to "top" instead
Signed-off-by: Todd Whiteman <todd.whiteman@joyent.com>
This commit is contained in:
@ -19,7 +19,7 @@ import (
|
||||
func TestExec(t *testing.T) {
|
||||
defer deleteAllContainers()
|
||||
|
||||
runCmd := exec.Command(dockerBinary, "run", "-d", "--name", "testing", "busybox", "sh", "-c", "echo test > /tmp/file && sleep 100")
|
||||
runCmd := exec.Command(dockerBinary, "run", "-d", "--name", "testing", "busybox", "sh", "-c", "echo test > /tmp/file && top")
|
||||
if out, _, _, err := runCommandWithStdoutStderr(runCmd); err != nil {
|
||||
t.Fatal(out, err)
|
||||
}
|
||||
@ -82,7 +82,7 @@ func TestExecInteractiveStdinClose(t *testing.T) {
|
||||
func TestExecInteractive(t *testing.T) {
|
||||
defer deleteAllContainers()
|
||||
|
||||
runCmd := exec.Command(dockerBinary, "run", "-d", "--name", "testing", "busybox", "sh", "-c", "echo test > /tmp/file && sleep 100")
|
||||
runCmd := exec.Command(dockerBinary, "run", "-d", "--name", "testing", "busybox", "sh", "-c", "echo test > /tmp/file && top")
|
||||
if out, _, _, err := runCommandWithStdoutStderr(runCmd); err != nil {
|
||||
t.Fatal(out, err)
|
||||
}
|
||||
@ -500,12 +500,12 @@ func TestLinksPingLinkedContainersOnRename(t *testing.T) {
|
||||
defer deleteAllContainers()
|
||||
|
||||
var out string
|
||||
out, _, _ = dockerCmd(t, "run", "-d", "--name", "container1", "busybox", "sleep", "10")
|
||||
out, _, _ = dockerCmd(t, "run", "-d", "--name", "container1", "busybox", "top")
|
||||
idA := strings.TrimSpace(out)
|
||||
if idA == "" {
|
||||
t.Fatal(out, "id should not be nil")
|
||||
}
|
||||
out, _, _ = dockerCmd(t, "run", "-d", "--link", "container1:alias1", "--name", "container2", "busybox", "sleep", "10")
|
||||
out, _, _ = dockerCmd(t, "run", "-d", "--link", "container1:alias1", "--name", "container2", "busybox", "top")
|
||||
idB := strings.TrimSpace(out)
|
||||
if idB == "" {
|
||||
t.Fatal(out, "id should not be nil")
|
||||
|
Reference in New Issue
Block a user