mirror of https://github.com/docker/compose.git
Fixed assertion after retry due to ACI flakyness on prune
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
This commit is contained in:
parent
ba3b057b8e
commit
2f4a84baff
|
@ -11,6 +11,7 @@ or Microsoft Azure Container Instances
|
||||||
using the Docker commands you already know.
|
using the Docker commands you already know.
|
||||||
|
|
||||||
To get started, all you need is:
|
To get started, all you need is:
|
||||||
|
|
||||||
* An [AWS](https://aws.amazon.com) or [Azure](https://azure.microsoft.com)
|
* An [AWS](https://aws.amazon.com) or [Azure](https://azure.microsoft.com)
|
||||||
account
|
account
|
||||||
* Windows: The Stable or Edge release of
|
* Windows: The Stable or Edge release of
|
||||||
|
|
|
@ -504,9 +504,12 @@ func TestContainerRunAttached(t *testing.T) {
|
||||||
if strings.Contains(res.Stderr(), "unsupported protocol scheme") { //Flaky strange error on azure SDK call happening only during prune --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)
|
time.Sleep(1 * time.Second)
|
||||||
res = c.RunDockerCmd("prune", "--force")
|
res = c.RunDockerCmd("prune", "--force")
|
||||||
}
|
// After the retry, it seems prune has sometimes actually been executed, and we get zero thigs to delete again...
|
||||||
|
assert.Assert(t, res.Stdout() == "Deleted resources:\n"+container+"\nTotal CPUs reclaimed: 0.10, total memory reclaimed: 0.10 GB\n" ||
|
||||||
|
res.Stdout() == "Deleted resources:\nTotal CPUs reclaimed: 0.00, total memory reclaimed: 0.00 GB\n", res.Stdout())
|
||||||
|
} else {
|
||||||
assert.Equal(t, "Deleted resources:\n"+container+"\nTotal CPUs reclaimed: 0.10, total memory reclaimed: 0.10 GB\n", res.Stdout())
|
assert.Equal(t, "Deleted resources:\n"+container+"\nTotal CPUs reclaimed: 0.10, total memory reclaimed: 0.10 GB\n", res.Stdout())
|
||||||
|
}
|
||||||
|
|
||||||
res = c.RunDockerCmd("ps", "--all")
|
res = c.RunDockerCmd("ps", "--all")
|
||||||
l = Lines(res.Stdout())
|
l = Lines(res.Stdout())
|
||||||
|
|
Loading…
Reference in New Issue