Browse Source

Trying to address more ACI flakyness, on container restart

Signed-off-by: Guillaume Tardif <[email protected]>
Guillaume Tardif 4 years ago
parent
commit
f3c017f502
1 changed files with 5 additions and 0 deletions
  1. 5 0
      tests/aci-e2e/e2e-aci_test.go

+ 5 - 0
tests/aci-e2e/e2e-aci_test.go

@@ -478,6 +478,11 @@ func TestContainerRunAttached(t *testing.T) {
 
 	t.Run("restart container", func(t *testing.T) {
 		res := c.RunDockerCmd("start", container)
+		//Flaky errors on restart : Code="ContainerGroupTransitioning" Message="The container group 'test-container' is still transitioning, please retry later."
+		if res.ExitCode != 0 && strings.Contains(res.Stderr(), `Code="ContainerGroupTransitioning"`) {
+			time.Sleep(3 * time.Second)
+			res = c.RunDockerCmd("start", container)
+		}
 		res.Assert(t, icmd.Expected{Out: container})
 		waitForStatus(t, c, container, convert.StatusRunning)
 	})