Author: chug
Date: Tue Jun 17 17:30:32 2014
New Revision: 1603230

URL: http://svn.apache.org/r1603230
Log:
PROTON-606: Python testReclaimCredit: fix for windows causes hang in RHEL6 
32-bit
This patch calls work() for each messenger even if it is stopped in order to
force a transition to stopped.

Modified:
    qpid/proton/trunk/tests/python/proton_tests/messenger.py

Modified: qpid/proton/trunk/tests/python/proton_tests/messenger.py
URL: 
http://svn.apache.org/viewvc/qpid/proton/trunk/tests/python/proton_tests/messenger.py?rev=1603230&r1=1603229&r2=1603230&view=diff
==============================================================================
--- qpid/proton/trunk/tests/python/proton_tests/messenger.py (original)
+++ qpid/proton/trunk/tests/python/proton_tests/messenger.py Tue Jun 17 
17:30:32 2014
@@ -707,19 +707,16 @@ class NBMessengerTest(common.Test):
     self.address = "amqp://0.0.0.0:12345"
     self.server.subscribe("amqp://~0.0.0.0:12345")
 
-  def _pump(self, timeout):
+  def _pump(self, timeout, work_triggers_exit):
     for msgr in self.messengers:
-      if not msgr.stopped:
-        if msgr.work(timeout):
-          return True
+      if msgr.work(timeout) and work_triggers_exit:
+        return True
     return False
 
   def pump(self, timeout=0):
-    while self._pump(0): pass
-    for msgr in self.messengers:
-      if not msgr.stopped:
-        msgr.work(timeout)
-    while self._pump(0): pass
+    while self._pump(0, True): pass
+    self._pump(timeout, False)
+    while self._pump(0, True): pass
 
   def teardown(self):
     self.server.stop()



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to