Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit ad37072

Browse files
authored
Merge pull request #1480 from gtardif/e2e_restart_race
Removed race in e2e test
2 parents 9df272a + ac1696e commit ad37072

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

local/e2e/compose/restart_test.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ func TestRestart(t *testing.T) {
4545
res := c.RunDockerOrExitError("compose", "-f", "./fixtures/restart-test/compose.yml", "--project-name", projectName, "up", "-d")
4646
assert.Assert(t, strings.Contains(res.Combined(), "Container e2e-restart_restart_1 Started"), res.Combined())
4747

48-
// Give the time for it to exit
49-
time.Sleep(time.Second)
48+
c.WaitForCmdResult(c.NewDockerCmd("compose", "--project-name", projectName, "ps", "-a", "--format", "json"),
49+
StdoutContains(`"State":"exited"`),
50+
10*time.Second, 1*time.Second)
5051

5152
res = c.RunDockerOrExitError("compose", "--project-name", projectName, "ps", "-a")
5253
testify.Regexp(t, getServiceRegx("restart", "exited"), res.Stdout())

0 commit comments

Comments
 (0)