From 865b14e02977cef0062fc26c9a875a8539f3ad9d Mon Sep 17 00:00:00 2001 From: Thomas LEVEIL Date: Wed, 30 Sep 2015 23:56:25 +0000 Subject: [PATCH] tests: fix minor bug in docker_wait_for_log --- test/lib/docker_helpers.bash | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/lib/docker_helpers.bash b/test/lib/docker_helpers.bash index 05eb0be..bbaf27e 100644 --- a/test/lib/docker_helpers.bash +++ b/test/lib/docker_helpers.bash @@ -33,15 +33,14 @@ function docker_assert_log { assert_output -p "$*" } -# wait for container $2 to contain a given text in its log +# wait for a container to produce a given text in its log # $1 container # $2 timeout in second # $* text to wait for function docker_wait_for_log { local -r container=$1 - shift - local -ir timeout_sec=$1 - shift + local -ir timeout_sec=$2 + shift 2 retry $(( $timeout_sec * 2 )) .5s docker_assert_log $container "$*" }