You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gm...@apache.org on 2016/03/23 14:07:21 UTC

qpid-dispatch git commit: DISPATCH-179 - Fixed system_tests_protocol_family, replaced discard test with test_simple_pre_settled

Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 2b1d8f67f -> e605fbd09


DISPATCH-179 - Fixed system_tests_protocol_family, replaced discard test with test_simple_pre_settled


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

Branch: refs/heads/master
Commit: e605fbd098abf613f2780c95d68914e6dcea47bb
Parents: 2b1d8f6
Author: Ganesh Murthy <gm...@redhat.com>
Authored: Wed Mar 23 09:07:02 2016 -0400
Committer: Ganesh Murthy <gm...@redhat.com>
Committed: Wed Mar 23 09:07:02 2016 -0400

----------------------------------------------------------------------
 tests/system_tests_protocol_family.py | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/e605fbd0/tests/system_tests_protocol_family.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_protocol_family.py b/tests/system_tests_protocol_family.py
index 0a3182b..6a4cb89 100644
--- a/tests/system_tests_protocol_family.py
+++ b/tests/system_tests_protocol_family.py
@@ -103,22 +103,38 @@ class ProtocolFamilyTest(TestCase):
                    ('connector', {'addr': '127.0.0.1', 'role': 'inter-router', 'port': inter_router_ipv4_port})
                ]
         )
-
         cls.routers[0].wait_router_connected('QDR.B')
         cls.routers[1].wait_router_connected('QDR.A')
         cls.routers[2].wait_router_connected('QDR.B')
 
     # Without at least one test the setUpClass does not execute
-    def test_00_discard(self):
+    # If this test has started executing, it means that the setUpClass() has successfully executed which means that
+    # the routers were able to communicate with each other successfully using the specified protocol family.
+    def test_simple_pre_settled(self):
         addr = self.routers[0].addresses[4]+"/test/1"
-        print 'addr', addr
         M1 = self.messenger()
+        M2 = self.messenger()
+
+        M1.start()
+        M2.start()
+        M2.subscribe(addr)
+
         tm = Message()
+        rm = Message()
+
         tm.address = addr
         for i in range(100):
             tm.body = {'number': i}
             M1.put(tm)
         M1.send()
 
+        for i in range(100):
+            M2.recv(1)
+            M2.get(rm)
+            self.assertEqual(i, rm.body['number'])
+
+        M1.stop()
+        M2.stop()
+
 if __name__ == '__main__':
     unittest.main(main_module())
\ No newline at end of file


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