qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r1343348 - in /qpid/trunk/qpid/cpp/src: qpid/ha/HaBroker.cpp tests/brokertest.py
Date Mon, 28 May 2012 18:24:15 GMT
Author: aconway
Date: Mon May 28 18:24:14 2012
New Revision: 1343348

URL: http://svn.apache.org/viewvc?rev=1343348&view=rev
Log:
QPID-3603: Close replication link when a backup broker is promoted to primary.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/ha/HaBroker.cpp
    qpid/trunk/qpid/cpp/src/tests/brokertest.py

Modified: qpid/trunk/qpid/cpp/src/qpid/ha/HaBroker.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/ha/HaBroker.cpp?rev=1343348&r1=1343347&r2=1343348&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/ha/HaBroker.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/ha/HaBroker.cpp Mon May 28 18:24:14 2012
@@ -106,6 +106,7 @@ void HaBroker::activate() {
 
 void HaBroker::activate(sys::Mutex::ScopedLock&) {
     setStatus(ACTIVE);
+    backup.reset();                    // No longer replicating, close link.
     broker.getConnectionObservers().remove(excluder); // This allows client connections.
 }
 

Modified: qpid/trunk/qpid/cpp/src/tests/brokertest.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/brokertest.py?rev=1343348&r1=1343347&r2=1343348&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/brokertest.py (original)
+++ qpid/trunk/qpid/cpp/src/tests/brokertest.py Mon May 28 18:24:14 2012
@@ -659,7 +659,7 @@ class NumberedReceiver(Thread):
             m = self.read_message()
             while m != -1:
                 self.receiver.assert_running()
-                assert(m <= self.received) # Check for missing messages
+                assert m <= self.received, "Missing message %s>%s"%(m, self.received)
                 if (m == self.received): # Ignore duplicates
                     self.received += 1
                     if self.sender:



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message