diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-03 12:05:50 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-03 12:05:50 +0200 |
commit | 22328c72aef2df73741afefe0e8b53d3ad83f15d (patch) | |
tree | 4a0b311508ebb28a0dc72e12993f704c2709d46a /tests/da-mainmsg-q.sh | |
parent | da933a7e105acf814d5e7955d39d29eab3a96613 (diff) | |
parent | 7c0ca7553738161c681c0d0600de99e9fabee81d (diff) | |
download | rsyslog-22328c72aef2df73741afefe0e8b53d3ad83f15d.tar.gz rsyslog-22328c72aef2df73741afefe0e8b53d3ad83f15d.tar.xz rsyslog-22328c72aef2df73741afefe0e8b53d3ad83f15d.zip |
Merge branch 'v5-devel'
Conflicts:
ChangeLog
runtime/datetime.c
Diffstat (limited to 'tests/da-mainmsg-q.sh')
-rwxr-xr-x | tests/da-mainmsg-q.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/da-mainmsg-q.sh b/tests/da-mainmsg-q.sh new file mode 100755 index 00000000..6ec2f3a9 --- /dev/null +++ b/tests/da-mainmsg-q.sh @@ -0,0 +1,31 @@ +# Test for DA mode on the main message queue +# This test checks if DA mode operates correctly. To do so, +# it uses a small in-memory queue size, so that DA mode is initiated +# rather soon, and disk spooling used. There is some uncertainty (based +# on machine speeds), but in general the test should work rather well. +# We add a few messages after the initial run, just so that we can +# check everything recovers from DA mode correctly. +# added 2009-04-22 by Rgerhards +# This file is part of the rsyslog project, released under GPLv3 +echo "testing main message queue in DA mode (going to disk)" +source $srcdir/diag.sh init +source $srcdir/diag.sh startup da-mainmsg-q.conf + +# part1: send first 50 messages (in memory, only) +#source $srcdir/diag.sh tcpflood 127.0.0.1 13514 1 50 +source $srcdir/diag.sh injectmsg 0 50 +source $srcdir/diag.sh wait-queueempty # let queue drain for this test case + +# part 2: send bunch of messages. This should trigger DA mode +#source $srcdir/diag.sh injectmsg 50 20000 +source $srcdir/diag.sh injectmsg 50 2000 +ls -l test-spool # for manual review + +# send another handful +source $srcdir/diag.sh injectmsg 2050 50 +#sleep 1 # we need this so that rsyslogd can receive all outstanding messages + +# clean up and check test result +source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages +source $srcdir/diag.sh seq-check 2099 +source $srcdir/diag.sh exit |