Repository: qpid-proton
Updated Branches:
  refs/heads/master da117ea28 -> 9ab060fda


modify testSelectable to allow for in-flight messages


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

Branch: refs/heads/master
Commit: 9ab060fda2afbfdf2046decf0ea9d80db594dc6a
Parents: da117ea
Author: Rafael Schloming <[email protected]>
Authored: Tue Apr 28 06:54:04 2015 -0400
Committer: Rafael Schloming <[email protected]>
Committed: Tue Apr 28 06:54:04 2015 -0400

----------------------------------------------------------------------
 tests/python/proton_tests/messenger.py | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9ab060fd/tests/python/proton_tests/messenger.py
----------------------------------------------------------------------
diff --git a/tests/python/proton_tests/messenger.py 
b/tests/python/proton_tests/messenger.py
index 298c5d9..26600e9 100644
--- a/tests/python/proton_tests/messenger.py
+++ b/tests/python/proton_tests/messenger.py
@@ -1013,8 +1013,15 @@ class SelectableMessengerTest(common.Test):
     mc = Message()
 
     for i in range(count):
+      before = mrcv.outgoing
       if mrcv.incoming == 0:
         p.pump()
+      # if we didn't receive the messages, they should be "in flight"
+      if mrcv.incoming == 0:
+        assert msnd.outgoing < before
+      # now pump until they arrive
+      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)


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

Reply via email to