DISPATCH-390: refactor - more reliable qdmanage test Wait for router to be connected, otherwise query test can get different results because connection happens during test.
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/390ebe7f Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/390ebe7f Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/390ebe7f Branch: refs/heads/master Commit: 390ebe7fbf296712513aec491b33641d03998e0f Parents: 99ef0a7 Author: Alan Conway <[email protected]> Authored: Tue Mar 28 04:13:29 2017 -0400 Committer: Alan Conway <[email protected]> Committed: Tue Apr 25 18:13:59 2017 -0400 ---------------------------------------------------------------------- tests/system_tests_qdmanage.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/390ebe7f/tests/system_tests_qdmanage.py ---------------------------------------------------------------------- diff --git a/tests/system_tests_qdmanage.py b/tests/system_tests_qdmanage.py index 5218f4c..17304f1 100644 --- a/tests/system_tests_qdmanage.py +++ b/tests/system_tests_qdmanage.py @@ -58,6 +58,7 @@ class QdmanageTest(TestCase): ]) cls.router_2 = cls.tester.qdrouterd('test_router_2', config_2, wait=True) cls.router_1 = cls.tester.qdrouterd('test_router_1', config_1, wait=True) + cls.router_1.wait_router_connected('R2') def address(self): return self.router_1.addresses[0] @@ -149,9 +150,7 @@ class QdmanageTest(TestCase): self.assertEqual([long_type('listener')]*2, [e['type'] for e in qlistener]) self.assertEqual(self.router_1.ports[0], int(qlistener[0]['port'])) - qattr = json.loads( - self.run_qdmanage('query type name')) - + qattr = json.loads(self.run_qdmanage('query type name')) for e in qattr: self.assertEqual(2, len(e)) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
