From 5974a4a509f66fe310b5f38be1d0a44694a388ed Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Wed, 10 Feb 2016 00:27:05 -0800 Subject: [PATCH] replace sleep with retry Signed-off-by: Victor Vieux --- test/integration/rescheduling.bats | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/integration/rescheduling.bats b/test/integration/rescheduling.bats index 0bc5bb7c12..43226c2861 100644 --- a/test/integration/rescheduling.bats +++ b/test/integration/rescheduling.bats @@ -188,8 +188,7 @@ function teardown() { # Restart node-0 docker_host start ${DOCKER_CONTAINERS[0]} - sleep 6 - [[ $(docker_swarm info | grep -c "Status: Unhealthy") -eq 0 ]] + retry 5 1 eval "test \"$(docker_swarm info | grep -c \"Status: Unhealthy\" | wc -l)\" = '0'" # Stop node-1 docker_host stop ${DOCKER_CONTAINERS[1]}