qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [7/7] qpid-proton git commit: NO-JIRA: fix SelectableMessengerTest on Mac
Date Tue, 28 Apr 2015 16:14:26 GMT
NO-JIRA: fix SelectableMessengerTest on Mac

The SelectableMessengerTest was failing intermittently on Mac builds,
Modify the test slightly to be more resilient.

Closes #23

(cherry picked from commit dd95103e510df31796482ea490f603c65e1a495f)


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/611cfa49
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/611cfa49
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/611cfa49

Branch: refs/heads/0.9.x
Commit: 611cfa49536f2718bb0fb76d06ce5ae3071968d9
Parents: 0610a4c
Author: Dominic Evans <dominic.evans@uk.ibm.com>
Authored: Tue Apr 28 16:11:30 2015 +0100
Committer: Dominic Evans <dominic.evans@uk.ibm.com>
Committed: Tue Apr 28 17:09:53 2015 +0100

----------------------------------------------------------------------
 tests/python/proton_tests/messenger.py | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/611cfa49/tests/python/proton_tests/messenger.py
----------------------------------------------------------------------
diff --git a/tests/python/proton_tests/messenger.py b/tests/python/proton_tests/messenger.py
index 94e4e0d..23004ba 100644
--- a/tests/python/proton_tests/messenger.py
+++ b/tests/python/proton_tests/messenger.py
@@ -1012,17 +1012,21 @@ class SelectableMessengerTest(common.Test):
 
     mc = Message()
 
-    for i in range(count):
-      while mrcv.incoming == 0:
-        p.pump()
-      assert mrcv.incoming > 0, (count, msnd.outgoing, mrcv.incoming)
-      mrcv.get(mc)
-      assert mc.body == u"Hello World! %s" % i, (i, mc.body)
-
-    mrcv.stop()
-    assert not mrcv.stopped
-    p.pump()
-    assert mrcv.stopped
+    try:
+      for i in range(count):
+        while mrcv.incoming == 0:
+          p.pump()
+        assert mrcv.incoming > 0, (count, msnd.outgoing, mrcv.incoming)
+        mrcv.get(mc)
+        assert mc.body == u"Hello World! %s" % i, (i, mc.body)
+    finally:
+      mrcv.stop()
+      msnd.stop()
+      assert not mrcv.stopped
+      assert not msnd.stopped
+      p.pump()
+      assert mrcv.stopped
+      assert msnd.stopped
 
   def testSelectable16(self):
     self.testSelectable(count=16)


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


Mime
View raw message