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:
Todd Whiteman
2015-04-09 10:46:57 -07:00
parent 2052d01b1e
commit 42d47c3136
6 changed files with 38 additions and 50 deletions
+4 -4
View File
@@ -7,7 +7,7 @@ import (
)
func TestKillContainer(t *testing.T) {
runCmd := exec.Command(dockerBinary, "run", "-d", "busybox", "sh", "-c", "sleep 10")
runCmd := exec.Command(dockerBinary, "run", "-d", "busybox", "top")
out, _, err := runCommandWithOutput(runCmd)
if err != nil {
t.Fatal(out, err)
@@ -37,11 +37,11 @@ func TestKillContainer(t *testing.T) {
deleteContainer(cleanedContainerID)
logDone("kill - kill container running sleep 10")
logDone("kill - kill container running top")
}
func TestKillDifferentUserContainer(t *testing.T) {
runCmd := exec.Command(dockerBinary, "run", "-u", "daemon", "-d", "busybox", "sh", "-c", "sleep 10")
runCmd := exec.Command(dockerBinary, "run", "-u", "daemon", "-d", "busybox", "top")
out, _, err := runCommandWithOutput(runCmd)
if err != nil {
t.Fatal(out, err)
@@ -71,5 +71,5 @@ func TestKillDifferentUserContainer(t *testing.T) {
deleteContainer(cleanedContainerID)
logDone("kill - kill container running sleep 10 from a different user")
logDone("kill - kill container running top from a different user")
}