mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Move inspect into the loop on InspectExecID test
Signed-off-by: Doug Davis <dug@us.ibm.com>
This commit is contained in:
parent
7f353a11e4
commit
f06620ece3
1 changed files with 6 additions and 6 deletions
|
@ -436,15 +436,15 @@ func (s *DockerSuite) TestInspectExecID(c *check.C) {
|
||||||
c.Fatalf("failed to start the exec cmd: %q", err)
|
c.Fatalf("failed to start the exec cmd: %q", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Since its still running we should see the exec as part of the container
|
|
||||||
out, err = inspectField(id, "ExecIDs")
|
|
||||||
if err != nil {
|
|
||||||
c.Fatalf("failed to inspect container: %s, %v", out, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Give the exec 10 chances/seconds to start then give up and stop the test
|
// Give the exec 10 chances/seconds to start then give up and stop the test
|
||||||
tries := 10
|
tries := 10
|
||||||
for i := 0; i < tries; i++ {
|
for i := 0; i < tries; i++ {
|
||||||
|
// Since its still running we should see exec as part of the container
|
||||||
|
out, err = inspectField(id, "ExecIDs")
|
||||||
|
if err != nil {
|
||||||
|
c.Fatalf("failed to inspect container: %s, %v", out, err)
|
||||||
|
}
|
||||||
|
|
||||||
out = strings.TrimSuffix(out, "\n")
|
out = strings.TrimSuffix(out, "\n")
|
||||||
if out != "[]" && out != "<no value>" {
|
if out != "[]" && out != "<no value>" {
|
||||||
break
|
break
|
||||||
|
|
Loading…
Add table
Reference in a new issue