summaryrefslogtreecommitdiffstats
path: root/tests/testsuites
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-05-25 15:39:18 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-05-25 15:39:18 +0200
commitddf74cc165c828139632170224356175c9c24e96 (patch)
tree9ed6cf51bd6dfbf4aef2025914cdb6aad0f09694 /tests/testsuites
parentb9549380270fa68e27e8ee3f049c7d34156a85ff (diff)
downloadrsyslog-ddf74cc165c828139632170224356175c9c24e96.tar.gz
rsyslog-ddf74cc165c828139632170224356175c9c24e96.tar.xz
rsyslog-ddf74cc165c828139632170224356175c9c24e96.zip
added test suite for persistent queue shutdown
Diffstat (limited to 'tests/testsuites')
-rw-r--r--tests/testsuites/memq-persist1.conf25
-rw-r--r--tests/testsuites/memq-persist2.conf20
2 files changed, 45 insertions, 0 deletions
diff --git a/tests/testsuites/memq-persist1.conf b/tests/testsuites/memq-persist1.conf
new file mode 100644
index 00000000..5240090f
--- /dev/null
+++ b/tests/testsuites/memq-persist1.conf
@@ -0,0 +1,25 @@
+# Test for persisting messages to disk on shutdown
+# rgerhards, 2009-04-17
+$ModLoad ../plugins/imtcp/.libs/imtcp
+$MainMsgQueueTimeoutShutdown 1
+$MainMsgQueueSaveOnShutdown on
+$InputTCPServerRun 13514
+
+$ModLoad ../plugins/imdiag/.libs/imdiag
+$IMDiagServerRun 13500
+
+$ModLoad ../plugins/omtesting/.libs/omtesting
+
+$ErrorMessagesToStderr off
+
+# set spool locations and switch queue to disk-only mode
+$WorkDirectory test-spool
+$MainMsgQueueFilename mainq
+$MainMsgQueueType LinkedList
+
+$template outfmt,"%msg:F,58:2%\n"
+$template dynfile,"rsyslog.out.log" # trick to use relative path names!
+:msg, contains, "msgnum:" ?dynfile;outfmt
+
+# delay execution so that a queue can build up:
+*.* :omtesting:sleep 0 1000
diff --git a/tests/testsuites/memq-persist2.conf b/tests/testsuites/memq-persist2.conf
new file mode 100644
index 00000000..23e29e2f
--- /dev/null
+++ b/tests/testsuites/memq-persist2.conf
@@ -0,0 +1,20 @@
+# Test for persisting messages to disk on shutdown
+# rgerhards, 2009-04-17
+$ModLoad ../plugins/imtcp/.libs/imtcp
+$MainMsgQueueTimeoutShutdown 10000
+$MainMsgQueueSaveOnShutdown on
+$InputTCPServerRun 13514
+
+$ModLoad ../plugins/imdiag/.libs/imdiag
+$IMDiagServerRun 13500
+
+$ErrorMessagesToStderr off
+
+# set spool locations and switch queue to disk-only mode
+$WorkDirectory test-spool
+$MainMsgQueueFilename mainq
+$MainMsgQueueType LinkedList
+
+$template outfmt,"%msg:F,58:2%\n"
+$template dynfile,"rsyslog.out.log" # trick to use relative path names!
+:msg, contains, "msgnum:" ?dynfile;outfmt