From a2e08d5dc436610ef1587a62f9c64f38928eac61 Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Thu, 14 Sep 2017 19:34:01 +0200 Subject: [PATCH] test: Add timeout before checking for status Under some slow environment (nested VMs) or with some not as fast runtimes (Clear Containers), asking for a status right away is racy. Signed-off-by: Samuel Ortiz --- test/ctr.bats | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/ctr.bats b/test/ctr.bats index a88f2a12..1bf4f8b9 100644 --- a/test/ctr.bats +++ b/test/ctr.bats @@ -28,6 +28,7 @@ function teardown() { run crictl start "$ctr_id" echo "$output" [ "$status" -eq 0 ] + run sleep 5 run crictl inspect --output yaml "$ctr_id" echo "$output" [ "$status" -eq 0 ] @@ -53,6 +54,7 @@ function teardown() { run crictl start "$ctr_id" echo "$output" [ "$status" -eq 0 ] + run sleep 5 run crictl inspect --output yaml "$ctr_id" echo "$output" [ "$status" -eq 0 ]