From a804136b1c395f3a7d958d2516c8eec45b126ce7 Mon Sep 17 00:00:00 2001 From: Guillaume Tardif Date: Wed, 9 Dec 2020 16:15:43 +0100 Subject: [PATCH] Trying to fix ACI flakyness on docker prune --force Signed-off-by: Guillaume Tardif --- tests/aci-e2e/e2e-aci_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/aci-e2e/e2e-aci_test.go b/tests/aci-e2e/e2e-aci_test.go index edc2b3cef..fdad7d76b 100644 --- a/tests/aci-e2e/e2e-aci_test.go +++ b/tests/aci-e2e/e2e-aci_test.go @@ -485,7 +485,11 @@ func TestContainerRunAttached(t *testing.T) { t.Run("prune dry run", func(t *testing.T) { res := c.RunDockerCmd("prune", "--dry-run") assert.Equal(t, "Resources that would be deleted:\nTotal CPUs reclaimed: 0.00, total memory reclaimed: 0.00 GB\n", res.Stdout()) - res = c.RunDockerCmd("prune", "--dry-run", "--force") + res = c.RunDockerOrExitError("prune", "--dry-run", "--force") + if strings.Contains(res.Stderr(), "unsupported protocol scheme") { //Flaky strange error on azure SDK call happening only during prune --force + time.Sleep(1 * time.Second) + res = c.RunDockerCmd("prune", "--dry-run", "--force") + } assert.Equal(t, "Resources that would be deleted:\n"+container+"\nTotal CPUs reclaimed: 0.10, total memory reclaimed: 0.10 GB\n", res.Stdout()) })