diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-03-31 15:14:22 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-03-31 15:14:22 +0200 |
commit | eccfbf71f9dbc235309c2ad40035d41620f5e5df (patch) | |
tree | 5654133eac53306c1bd91f9f16c353b0efcbd1e9 | |
parent | 00e1f24187ee814801e6969629b82a7ae030beaf (diff) | |
download | rsyslog-eccfbf71f9dbc235309c2ad40035d41620f5e5df.tar.gz rsyslog-eccfbf71f9dbc235309c2ad40035d41620f5e5df.tar.xz rsyslog-eccfbf71f9dbc235309c2ad40035d41620f5e5df.zip |
improved testbench, updated ChangeLog to reflect recent bugfix
After trying out some more things with the new code (after last
bugfix), I now think that the bugfix is OK to use and without
regressions.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | tests/Makefile.am | 6 | ||||
-rwxr-xr-x | tests/rcvr_fail_restore.sh | 42 |
3 files changed, 42 insertions, 10 deletions
@@ -1,4 +1,8 @@ --------------------------------------------------------------------------- +Version 5.8.0 [V5-stable] (rgerhards), 2011-04-?? +- bugfix: DA queue was never shutdown once it was started + closes: http://bugzilla.adiscon.com/show_bug.cgi?id=241 +--------------------------------------------------------------------------- Version 5.7.10 [V5-BETA] (rgerhards), 2011-03-29 - bugfix: ompgsql did not work properly with ANSI SQL strings closes: http://bugzilla.adiscon.com/show_bug.cgi?id=229 diff --git a/tests/Makefile.am b/tests/Makefile.am index ebbe0cf6..930aa304 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -56,8 +56,7 @@ TESTS += \ failover-rptd.sh \ failover-no-rptd.sh \ failover-no-basic.sh \ - queue-persist.sh - queue-persist.sh \ + rcvr_fail_restore.sh \ linkedlistqueue.sh endif @@ -289,6 +288,9 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \ diag.sh \ testsuites/diag-common.conf \ testsuites/diag-common2.conf \ + rcvr_fail_restore.sh \ + testsuites/rcvr_fail_restore_rcvr.conf \ + testsuites/rcvr_fail_restore_sender.conf \ daqueue-persist.sh \ daqueue-persist-drvr.sh \ queue-persist.sh \ diff --git a/tests/rcvr_fail_restore.sh b/tests/rcvr_fail_restore.sh index e2f0a0d8..79486f10 100755 --- a/tests/rcvr_fail_restore.sh +++ b/tests/rcvr_fail_restore.sh @@ -9,31 +9,32 @@ source $srcdir/diag.sh init # # start up the instances. Note that the envrionment settings can be changed to # set instance-specific debugging parameters! -export RSYSLOG_DEBUG="debug nostdout" +#export RSYSLOG_DEBUG="debug nostdout" #export RSYSLOG_DEBUGLOG="log2" source $srcdir/diag.sh startup rcvr_fail_restore_rcvr.conf 2 -export RSYSLOG_DEBUGLOG="log" +#export RSYSLOG_DEBUGLOG="log" #valgrind="valgrind" source $srcdir/diag.sh startup rcvr_fail_restore_sender.conf # re-set params so that new instances do not thrash it... -unset RSYSLOG_DEBUG -unset RSYSLOG_DEBUGLOG +#unset RSYSLOG_DEBUG +#unset RSYSLOG_DEBUGLOG # now inject the messages into instance 2. It will connect to instance 1, # and that instance will record the data. source $srcdir/diag.sh injectmsg 1 1000 source $srcdir/diag.sh wait-queueempty -./msleep 3000 # make sure some retries happen (retry interval is set to 1 second) +./msleep 1000 # let things settle down a bit + # # Step 2: shutdown receiver, then send some more data, which then # needs to go into the queue. # + source $srcdir/diag.sh shutdown-when-empty 2 source $srcdir/diag.sh wait-shutdown 2 source $srcdir/diag.sh injectmsg 1001 10000 -sleep 1 # we need to wait, otherwise we may be so fast that the receiver -# comes up before we have finally suspended the action +./msleep 3000 # make sure some retries happen (retry interval is set to 3 second) source $srcdir/diag.sh get-mainqueuesize ls -l test-spool @@ -73,6 +74,31 @@ then # exit 1 fi +# +# We now do an extra test (so this is two in one ;)) to see if the DA +# queue can be reactivated after its initial shutdown. In essence, we +# redo steps 2 and 3. +# +# Step 5: stop receiver again, then send some more data, which then +# needs to go into the queue. +# +echo "*** done primary test *** now checking if DA can be restarted" +source $srcdir/diag.sh shutdown-when-empty 2 +source $srcdir/diag.sh wait-shutdown 2 + +source $srcdir/diag.sh injectmsg 11011 10000 +sleep 1 # we need to wait, otherwise we may be so fast that the receiver +# comes up before we have finally suspended the action +source $srcdir/diag.sh get-mainqueuesize +ls -l test-spool + +# +# Step 6: restart receiver, wait that the sender drains its queue +# +source $srcdir/diag.sh startup rcvr_fail_restore_rcvr.conf 2 +echo waiting for sender to drain queue [may need a short while] +source $srcdir/diag.sh wait-queueempty +ls -l test-spool # # Queue file size checks done. Now it is time to terminate the system @@ -92,5 +118,5 @@ then exit 1 fi # do the final check -source $srcdir/diag.sh seq-check 1 11010 +source $srcdir/diag.sh seq-check 1 21010 source $srcdir/diag.sh exit |