mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-16 13:20:41 +01:00
testbench: wait function needs to support slow machines
This commit is contained in:
parent
c186a1c03b
commit
04f792de8d
@ -72,7 +72,7 @@ export ZOOPIDFILE="$(pwd)/zookeeper.pid"
|
||||
#export RSYSLOG_DEBUG="debug nologfuncflow noprintmutexaction nostdout"
|
||||
#export RSYSLOG_DEBUGLOG="log"
|
||||
TB_TIMEOUT_STARTSTOP=400 # timeout for start/stop rsyslogd in tenths (!) of a second 400 => 40 sec
|
||||
TB_TEST_TIMEOUT=60 # number of seconds after which test checks timeout (eg. waits)
|
||||
TB_TEST_TIMEOUT=90 # number of seconds after which test checks timeout (eg. waits)
|
||||
# note that 40sec for the startup should be sufficient even on very slow machines. we changed this from 2min on 2017-12-12
|
||||
export RSYSLOG_DEBUG_TIMEOUTS_TO_STDERR="on" # we want to know when we loose messages due to timeouts
|
||||
if [ "$TESTTOOL_DIR" == "" ]; then
|
||||
@ -120,6 +120,19 @@ tb_timestamp() {
|
||||
date +%H:%M:%S
|
||||
}
|
||||
|
||||
# override the test timeout, but only if the new value is higher
|
||||
# than the previous one. This is necessary for slow test systems
|
||||
# $1 is timeout in seconds
|
||||
override_test_timeout() {
|
||||
if [ "${1:=0}" == "" ]; then
|
||||
printf 'FAIL: invalid testbench call, override_test_timeout needs value\n'
|
||||
error_exit 100
|
||||
fi
|
||||
if [ "$1" -gt "$TB_TEST_TIMEOUT" ]; then
|
||||
TB_TEST_TIMEOUT=$1
|
||||
printf 'info: TB_TEST_TIMEOUT increased to %s\n' "$TB_TEST_TIMEOUT"
|
||||
fi
|
||||
}
|
||||
|
||||
# set special tests status. States ($1) are:
|
||||
# unreliable -- as the name says, test does not work reliably; $2 must be github issue URL
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
|
||||
export ES_PORT=19200
|
||||
export NUMMESSAGES=100
|
||||
override_test_timeout 120
|
||||
#export USE_VALGRIND="YES" # to enable this to run under valgrind
|
||||
|
||||
download_elasticsearch
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user