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 2019/10/31 15:00:17 UTC
[qpid-dispatch] branch master updated: DISPATCH-1428 - Minor
modification to test to make sure link routes are all activated before the
test begins. This closes #603.
This is an automated email from the ASF dual-hosted git repository.
gmurthy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git
The following commit(s) were added to refs/heads/master by this push:
new 7113617 DISPATCH-1428 - Minor modification to test to make sure link routes are all activated before the test begins. This closes #603.
7113617 is described below
commit 711361778332a4c434a899ce76806b7b4b749f97
Author: Ganesh Murthy <gm...@apache.org>
AuthorDate: Tue Oct 29 11:45:26 2019 -0400
DISPATCH-1428 - Minor modification to test to make sure link routes are all activated before the test begins. This closes #603.
---
tests/system_tests_link_routes.py | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/tests/system_tests_link_routes.py b/tests/system_tests_link_routes.py
index 22ceeaf..ab2780a 100644
--- a/tests/system_tests_link_routes.py
+++ b/tests/system_tests_link_routes.py
@@ -31,7 +31,7 @@ from system_test import AsyncTestSender
from system_test import AsyncTestReceiver
from system_test import QdManager
from system_test import MgmtMsgProxy
-from system_test import unittest
+from system_test import unittest, QdManager
from test_broker import FakeBroker
from proton import Delivery
@@ -2121,6 +2121,31 @@ class Dispatch1428(TestCase):
for c in cmds:
self.run_qdmanage(cmd=c, address=self.routers[1].addresses[0])
+ # Now that the qdmanage has run, query the link routes and make sure that their "operStatus" is "active" before
+ # running any of the tests.
+ long_type = 'org.apache.qpid.dispatch.router.config.linkRoute'
+ qd_manager = QdManager(self, address=self.routers[1].addresses[0])
+
+ for i in xrange(5):
+ all_link_routes_activated = True
+ link_routes = qd_manager.query(long_type)
+ for link_route in link_routes:
+ oper_status = link_route['operStatus']
+ if oper_status != "active":
+ all_link_routes_activated = False
+ break
+ if not all_link_routes_activated:
+ # One or more of the link routes have not been activated.
+ # Check after one second.
+ sleep(1)
+ else:
+ break
+
+ # All link routes created in this test MUST be activated before
+ # we can continue further testing.
+ self.assertTrue(all_link_routes_activated)
+
+
first = SendReceive("%s/foo" % self.routers[1].addresses[0], "%s/foo" % self.routers[0].addresses[0])
first.run()
self.assertEqual(None, first.error)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org