summaryrefslogtreecommitdiff
path: root/cpp/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/tests')
-rwxr-xr-xcpp/src/tests/replication_test6
1 files changed, 6 insertions, 0 deletions
diff --git a/cpp/src/tests/replication_test b/cpp/src/tests/replication_test
index 9b6e5cfb29..605ee1376c 100755
--- a/cpp/src/tests/replication_test
+++ b/cpp/src/tests/replication_test
@@ -55,10 +55,12 @@ if test -d ${PYTHON_DIR} && test -e ../.libs/replicating_listener.so && test -e
$PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" add queue queue-a --generate-queue-events 2
$PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" add queue queue-b --generate-queue-events 2
$PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" add queue queue-c --generate-queue-events 1
+ $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" add queue queue-d --generate-queue-events 2
$PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add queue queue-a
$PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add queue queue-b
$PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add queue queue-c
+ #queue-d deliberately not declared on DR; this error case should be handled
#publish and consume from test queus on broker A:
for i in `seq 1 10`; do echo Message $i for A >> queue-a-input.repl; done
@@ -68,10 +70,12 @@ if test -d ${PYTHON_DIR} && test -e ../.libs/replicating_listener.so && test -e
./sender --port $BROKER_A --routing-key queue-a --send-eos 1 < queue-a-input.repl
./sender --port $BROKER_A --routing-key queue-b --send-eos 1 < queue-b-input.repl
./sender --port $BROKER_A --routing-key queue-c --send-eos 1 < queue-c-input.repl
+ echo dummy | ./sender --port $BROKER_A --routing-key queue-d --send-eos 1
./receiver --port $BROKER_A --queue queue-a --messages 5 > /dev/null
./receiver --port $BROKER_A --queue queue-b --messages 10 > /dev/null
./receiver --port $BROKER_A --queue queue-c --messages 10 > /dev/null
+ ./receiver --port $BROKER_A --queue queue-d > /dev/null
#shutdown broker A then check that broker Bs versions of the queues are as expected
../qpidd -q --port $BROKER_A
@@ -90,6 +94,8 @@ if test -d ${PYTHON_DIR} && test -e ../.libs/replicating_listener.so && test -e
diff queue-b-backup.repl queue-b-expected.repl || FAIL=1
diff queue-c-backup.repl queue-c-input.repl || FAIL=1
+ grep 'queue-d does not exist' replication-dest.log > /dev/null || echo "WARNING: Expected error to be logged!"
+
if [[ $FAIL ]]; then
echo replication test failed: expectations not met!
exit 1