From 44f3f5d567aaf19b50304f7b98b4773f57c087db Mon Sep 17 00:00:00 2001 From: Ramil Valitov Date: Mon, 21 Sep 2020 14:54:08 +0300 Subject: [PATCH] [fix] long run tests --- tests/all.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/all.sh b/tests/all.sh index e40633e..33e5260 100644 --- a/tests/all.sh +++ b/tests/all.sh @@ -157,7 +157,7 @@ function printElapsedTime() { function assertExecutionTime() { local MAX_TIME MAX_TIME=$(echo "$ZABBIX_TIMEOUT * 1000" | bc) - assertTrue "The script worked for too long" "[ $ELAPSED_TIME -lt $MAX_TIME ]" + assertTrue "The script worked for too long: $ELAPSED_TIME ms, allowed $MAX_TIME ms" "[ $ELAPSED_TIME -lt $MAX_TIME ]" } function getPHPVersion() { @@ -938,20 +938,20 @@ testZabbixDiscoverManyPools() { testDiscoverScriptManyPoolsRunDuration() { MAX_RUNS=5 for ((c = 1; c <= MAX_RUNS; c++)); do + StartTimer printAction "Run #$c..." testDiscoverScriptRunDuration done - printElapsedTime printSuccess "${FUNCNAME[0]}" } testZabbixDiscoverManyPoolsRunDuration() { MAX_RUNS=5 for ((c = 1; c <= MAX_RUNS; c++)); do + StartTimer printAction "Run #$c..." testZabbixDiscoverRunDuration done - printElapsedTime printSuccess "${FUNCNAME[0]}" }