You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2013/09/04 21:01:19 UTC

svn commit: r1520108 - in /qpid/trunk/qpid/cpp/src: qpid/ha/PrimaryTxObserver.cpp tests/brokertest.py tests/ha_test.py

Author: aconway
Date: Wed Sep  4 19:01:18 2013
New Revision: 1520108

URL: http://svn.apache.org/r1520108
Log:
NO-JIRA: HA minor fixes to test framework & comments.

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

Modified: qpid/trunk/qpid/cpp/src/qpid/ha/PrimaryTxObserver.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/ha/PrimaryTxObserver.cpp?rev=1520108&r1=1520107&r2=1520108&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/ha/PrimaryTxObserver.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/ha/PrimaryTxObserver.cpp Wed Sep  4 19:01:18 2013
@@ -141,10 +141,11 @@ void PrimaryTxObserver::deduplicate(sys:
 
 bool PrimaryTxObserver::prepare() {
     sys::Mutex::ScopedLock l(lock);
-    // FIXME aconway 2013-07-23: WRONG blocking. Need async completion.
     QPID_LOG(debug, logPrefix << "Prepare");
     deduplicate(l);
     txQueue->deliver(TxPrepareEvent().message());
+    // TODO aconway 2013-09-04: Blocks the current thread till backups respond.
+    // Need a non-blocking approach (e.g. async completion or borrowing a thread)
     while (!unprepared.empty() && !failed) lock.wait();
     return !failed;
 }

Modified: qpid/trunk/qpid/cpp/src/tests/brokertest.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/brokertest.py?rev=1520108&r1=1520107&r2=1520108&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/brokertest.py (original)
+++ qpid/trunk/qpid/cpp/src/tests/brokertest.py Wed Sep  4 19:01:18 2013
@@ -370,7 +370,7 @@ class Broker(Popen):
         deadline = time.time()+timeout
         while True:
             try:
-                c = self.connect(**kwargs)
+                c = self.connect(timeout=timeout, **kwargs)
                 try:
                     c.session()
                     return      # All good

Modified: qpid/trunk/qpid/cpp/src/tests/ha_test.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/ha_test.py?rev=1520108&r1=1520107&r2=1520108&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/ha_test.py (original)
+++ qpid/trunk/qpid/cpp/src/tests/ha_test.py Wed Sep  4 19:01:18 2013
@@ -271,8 +271,10 @@ acl allow all all
         try: return self.connect()
         except ConnectionError: return None
 
-    def ready(self):
-        return Broker.ready(self, client_properties={"qpid.ha-admin":1})
+    def ready(self, *args, **kwargs):
+        if not 'client_properties' in kwargs: kwargs['client_properties'] = {}
+        kwargs['client_properties']['qpid.ha-admin'] = True
+        return Broker.ready(self, *args, **kwargs)
 
     def kill(self, final=True):
         if final: self.ha_port.stop()



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