mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-13 07:10:42 +01:00
* add an overall timeout value for tests - if running longer, testbench framework tries to FAIL and end test. Note that this is not bullet-proof and not intended to be so. * guard against hanging rsyslog instances via a new imdiag feature to abort after n number of seconds; among others, this guards as against timeout-cancel in CI, which is always pretty hard to diagnose - now we see these errors in test-suite.log * fix a bug in tcp zip test, which actually did not use zip mode * experimnentalls add debug output to better understand shutdown_when_empty operation; goal is to improve understanding and then remove that code again. * improve shutdown predicate for a couple of tests * made travis run make check with two parallel threads, for which we seem ready now. Nevertheless, it's still experimental and we may roll this back if required.
41 lines
1018 B
Bash
Executable File
41 lines
1018 B
Bash
Executable File
#!/bin/bash
|
|
# This file is part of the rsyslog project, released under ASL 2.0
|
|
. ${srcdir:=.}/diag.sh init
|
|
export ES_DOWNLOAD=elasticsearch-6.0.0.tar.gz
|
|
export ES_PORT=19200
|
|
export NUMMESSAGES=10000
|
|
export QUEUE_EMPTY_CHECK_FUNC=es_shutdown_empty_check
|
|
download_elasticsearch
|
|
prepare_elasticsearch
|
|
start_elasticsearch
|
|
|
|
init_elasticsearch
|
|
generate_conf
|
|
add_conf '
|
|
template(name="tpl" type="string"
|
|
string="{\"msgnum\":\"%msg:F,58:2%\"}")
|
|
|
|
module(load="../plugins/omelasticsearch/.libs/omelasticsearch")
|
|
:msg, contains, "msgnum:" {
|
|
action(type="omelasticsearch"
|
|
template="tpl"
|
|
serverport=`echo $ES_PORT`
|
|
searchIndex="rsyslog_testbench"
|
|
bulkmode="on"
|
|
errorFile="./'${RSYSLOG_DYNNAME}'.errorfile")
|
|
}
|
|
'
|
|
startup
|
|
injectmsg 0 $NUMMESSAGES
|
|
shutdown_when_empty
|
|
wait_shutdown
|
|
es_getdata $NUMMESSAGES $ES_PORT
|
|
if [ -f ${RSYSLOG_DYNNAME}.errorfile ]; then
|
|
printf 'error: error file exists!\n'
|
|
cat -n ${RSYSLOG_DYNNAME}.errorfile
|
|
error_exit 1
|
|
fi
|
|
seq_check
|
|
cleanup_elasticsearch
|
|
exit_test
|