mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-03 20:21:44 +00:00
Replace "sleep" by "top" in test implementation
Eliminate any chance of race condition by replacing a call to sleep by a call to top, and rely on test cleanup logic to have it exit cleanly. Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
This commit is contained in:
@@ -94,7 +94,7 @@ type containerPs struct {
|
||||
func (s *DockerSuite) TestContainerPsOmitFields(c *check.C) {
|
||||
name := "pstest"
|
||||
port := 80
|
||||
runCmd := exec.Command(dockerBinary, "run", "-d", "--name", name, "--expose", strconv.Itoa(port), "busybox", "sleep", "5")
|
||||
runCmd := exec.Command(dockerBinary, "run", "-d", "--name", name, "--expose", strconv.Itoa(port), "busybox", "top")
|
||||
_, err := runCommand(runCmd)
|
||||
c.Assert(err, check.IsNil)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user