From d76242e5b4d4463508f85b85d28512f9ad720170 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Fri, 22 Nov 2019 16:31:04 +0100 Subject: e2e/prune: run two top containers In hope to make the prune tests more robust, run two top containers and stop one explicitly to reduce the risk of a race condition. Fixes: #4452 Signed-off-by: Valentin Rothberg --- test/e2e/prune_test.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'test/e2e') diff --git a/test/e2e/prune_test.go b/test/e2e/prune_test.go index df0525a79..3a7185b48 100644 --- a/test/e2e/prune_test.go +++ b/test/e2e/prune_test.go @@ -43,9 +43,14 @@ var _ = Describe("Podman prune", func() { top.WaitWithDefaultTimeout() Expect(top.ExitCode()).To(Equal(0)) - session := podmanTest.Podman([]string{"run", ALPINE, "ls"}) - session.WaitWithDefaultTimeout() - Expect(session.ExitCode()).To(Equal(0)) + top = podmanTest.RunTopContainer("") + top.WaitWithDefaultTimeout() + Expect(top.ExitCode()).To(Equal(0)) + cid := top.OutputToString() + + stop := podmanTest.Podman([]string{"stop", cid}) + stop.WaitWithDefaultTimeout() + Expect(stop.ExitCode()).To(Equal(0)) prune := podmanTest.Podman([]string{"container", "prune"}) prune.WaitWithDefaultTimeout() -- cgit v1.2.3-54-g00ecf