summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2012-03-08 21:47:04 +0000
committerAlan Conway <aconway@apache.org>2012-03-08 21:47:04 +0000
commita182b58af59bb455d98836940258bb40084e669c (patch)
treed6ef9197b75c82fcbdc74adface578641eacced8 /cpp/src
parenta567ec9a74897ca77b75b93caa2ed3d6e3fb7223 (diff)
downloadqpid-python-a182b58af59bb455d98836940258bb40084e669c.tar.gz
QPID-3603: rgmanager integration for new HA cluster
- service start script qpid-primary, called by rgmanager to promote a broker. - example cluster.conf - minor changes to qpid-ha git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1298602 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rwxr-xr-xcpp/src/tests/cluster_failover18
1 files changed, 18 insertions, 0 deletions
diff --git a/cpp/src/tests/cluster_failover b/cpp/src/tests/cluster_failover
new file mode 100755
index 0000000000..c978ee910c
--- /dev/null
+++ b/cpp/src/tests/cluster_failover
@@ -0,0 +1,18 @@
+#!/bin/sh
+# A simple manual failover test, sends a stream of numbered messages.
+# You can kill the connected broker and verify that the client reconnects
+# and no messages are lost.
+
+URL=$1
+test -n "$URL" || { echo Usage: $0 URL ; exit 1; }
+SEND=$(mktemp /tmp/send.XXXXXXXXXX)
+RECV=$(mktemp /tmp/recv.XXXXXXXXXX)
+echo $SEND $RECV
+
+seq 1000000 > $SEND
+
+qpid-receive -f -a 'q;{create:always}' -b $URL --connection-options "{reconnect:true}" | tee $RECV &
+
+qpid-send -a 'q;{create:always}' -b $URL --connection-options "{reconnect:true}" --send-rate 10 --content-stdin < $SEND &
+
+wait