diff options
| author | Kim van der Riet <kpvdr@apache.org> | 2012-05-04 15:39:19 +0000 |
|---|---|---|
| committer | Kim van der Riet <kpvdr@apache.org> | 2012-05-04 15:39:19 +0000 |
| commit | 633c33f224f3196f3f9bd80bd2e418d8143fea06 (patch) | |
| tree | 1391da89470593209466df68c0b40b89c14963b1 /cpp/src/tests/cluster_failover | |
| parent | c73f9286ebff93a6c8dbc29cf05e258c4b55c976 (diff) | |
| download | qpid-python-633c33f224f3196f3f9bd80bd2e418d8143fea06.tar.gz | |
QPID-3858: Updated branch - merged from trunk r.1333987
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1334037 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/cluster_failover')
| -rwxr-xr-x | cpp/src/tests/cluster_failover | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cpp/src/tests/cluster_failover b/cpp/src/tests/cluster_failover new file mode 100755 index 0000000000..43170c731a --- /dev/null +++ b/cpp/src/tests/cluster_failover @@ -0,0 +1,19 @@ +#!/bin/sh +# A simple manual failover test, sends a stream of numbered messages. +# You can kill the connected broker and verify that the clients reconnect +# 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-send -a 'cluster_failover;{create:always}' -b $URL --connection-options "{reconnect:true}" --send-rate 10 --content-stdin < $SEND & + +while msg=$(qpid-receive -m1 -f -a 'cluster_failover;{create:always}' -b $URL --connection-options "{reconnect:true,heartbeat:1}"); do + echo -n $msg; date +done +wait |
