mirror of
https://github.com/rvalitov/zabbix-php-fpm.git
synced 2023-11-05 03:30:27 +01:00
[fix] long run tests
This commit is contained in:
parent
92222fb293
commit
44f3f5d567
@ -157,7 +157,7 @@ function printElapsedTime() {
|
|||||||
function assertExecutionTime() {
|
function assertExecutionTime() {
|
||||||
local MAX_TIME
|
local MAX_TIME
|
||||||
MAX_TIME=$(echo "$ZABBIX_TIMEOUT * 1000" | bc)
|
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() {
|
function getPHPVersion() {
|
||||||
@ -938,20 +938,20 @@ testZabbixDiscoverManyPools() {
|
|||||||
testDiscoverScriptManyPoolsRunDuration() {
|
testDiscoverScriptManyPoolsRunDuration() {
|
||||||
MAX_RUNS=5
|
MAX_RUNS=5
|
||||||
for ((c = 1; c <= MAX_RUNS; c++)); do
|
for ((c = 1; c <= MAX_RUNS; c++)); do
|
||||||
|
StartTimer
|
||||||
printAction "Run #$c..."
|
printAction "Run #$c..."
|
||||||
testDiscoverScriptRunDuration
|
testDiscoverScriptRunDuration
|
||||||
done
|
done
|
||||||
printElapsedTime
|
|
||||||
printSuccess "${FUNCNAME[0]}"
|
printSuccess "${FUNCNAME[0]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
testZabbixDiscoverManyPoolsRunDuration() {
|
testZabbixDiscoverManyPoolsRunDuration() {
|
||||||
MAX_RUNS=5
|
MAX_RUNS=5
|
||||||
for ((c = 1; c <= MAX_RUNS; c++)); do
|
for ((c = 1; c <= MAX_RUNS; c++)); do
|
||||||
|
StartTimer
|
||||||
printAction "Run #$c..."
|
printAction "Run #$c..."
|
||||||
testZabbixDiscoverRunDuration
|
testZabbixDiscoverRunDuration
|
||||||
done
|
done
|
||||||
printElapsedTime
|
|
||||||
printSuccess "${FUNCNAME[0]}"
|
printSuccess "${FUNCNAME[0]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user