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

Commit be0a895

Browse files
committed
more brutal aci flakyness resolution
Signed-off-by: Guillaume Tardif <[email protected]>
1 parent 657e894 commit be0a895

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

aci/e2e/e2e-aci_test.go

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ func TestContainerRunAttached(t *testing.T) {
413413
}
414414
return poll.Continue("waiting for container to be running, current inspect result: \n%s", res.Combined())
415415
}
416-
poll.WaitOn(t, checkRunning, poll.WithDelay(5*time.Second), poll.WithTimeout(90*time.Second))
416+
poll.WaitOn(t, checkRunning, poll.WithDelay(5*time.Second), poll.WithTimeout(180*time.Second))
417417

418418
inspectRes := c.RunDockerCmd("inspect", container)
419419

@@ -480,11 +480,19 @@ func TestContainerRunAttached(t *testing.T) {
480480
res := c.RunDockerOrExitError("start", container)
481481
//Flaky errors on restart : Code="ContainerGroupTransitioning" Message="The container group 'test-container' is still transitioning, please retry later."
482482
if res.ExitCode != 0 && strings.Contains(res.Stderr(), `Code="ContainerGroupTransitioning"`) {
483-
time.Sleep(3 * time.Second)
484-
res = c.RunDockerCmd("start", container)
483+
res = c.RunDockerOrExitError("rm", "-f", container)
484+
if strings.Contains(res.Stderr(), "unsupported protocol scheme") { // ...
485+
time.Sleep(1 * time.Second)
486+
c.RunDockerCmd("rm", "-f", container)
487+
}
488+
c.RunDockerCmd("run",
489+
"--name", container,
490+
"--memory", "0.1G", "--cpus", "0.1",
491+
"nginx")
492+
} else {
493+
res.Assert(t, icmd.Expected{Out: container})
494+
waitForStatus(t, c, container, convert.StatusRunning)
485495
}
486-
res.Assert(t, icmd.Expected{Out: container})
487-
waitForStatus(t, c, container, convert.StatusRunning)
488496
})
489497

490498
t.Run("prune dry run", func(t *testing.T) {

0 commit comments

Comments
 (0)