You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by cc...@apache.org on 2009/07/31 15:54:26 UTC

svn commit: r799614 - /qpid/trunk/qpid/cpp/src/tests/replication_test

Author: cctrieloff
Date: Fri Jul 31 13:54:26 2009
New Revision: 799614

URL: http://svn.apache.org/viewvc?rev=799614&view=rev
Log:
Make previous test more robust, add some comments

Modified:
    qpid/trunk/qpid/cpp/src/tests/replication_test

Modified: qpid/trunk/qpid/cpp/src/tests/replication_test
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/replication_test?rev=799614&r1=799613&r2=799614&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/replication_test (original)
+++ qpid/trunk/qpid/cpp/src/tests/replication_test Fri Jul 31 13:54:26 2009
@@ -56,10 +56,12 @@
     $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_A" add queue queue-e --generate-queue-events 1
 
     $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
+    $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add queue queue-e
     #queue-d deliberately not declared on DR; this error case should be handled
 
     #publish and consume from test queues on broker A:
@@ -89,6 +91,12 @@
     ./receiver --port $BROKER_A --queue queue-c --messages 10 > /dev/null
     ./receiver --port $BROKER_A --queue queue-d > /dev/null
     
+
+    # What we are doing is putting a message on the end of repliaction queue & waiting for it on remote side
+    # making sure all the messages have been flushed from the replication queue.
+    echo dummy | ./sender --port $BROKER_A --routing-key queue-e --send-eos 1
+    ./receiver --port $BROKER_B --queue queue-e --messages 1 > /dev/null
+
     #shutdown broker A then check that broker Bs versions of the queues are as expected
     ../qpidd -q --port $BROKER_A
     unset BROKER_A
@@ -133,10 +141,13 @@
 
     ./sender --port $BROKER_A --routing-key queue-e --send-eos 1 < queue-e-input.repl
     ./receiver --port $BROKER_A --queue queue-e --messages 10 > /dev/null
-    # now check offsets working
+    
+    # What we are doing is putting a message on the end of repliaction queue & waiting for it on remote side
+    # making sure all the messages have been flushed from the replication queue.
     echo dummy | ./sender --port $BROKER_A --routing-key queue-d --send-eos 1
     ./receiver --port $BROKER_B --queue queue-d --messages 1 > /dev/null
 
+    # now check offsets working
     ../qpidd -q --port $BROKER_B
     unset BROKER_B
     ../qpidd --daemon --port 0 --no-data-dir --no-module-dir --auth no --load-module ../.libs/replication_exchange.so  --log-enable info+ --log-to-file replication-dest.log  --log-to-stderr 0 > qpidd.port



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org