NO-JIRA: Remove sleep from system_tests_sasl_plain Sleep is slow and unreliable, replaced with wait_connectors()
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/365f851d Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/365f851d Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/365f851d Branch: refs/heads/master Commit: 365f851d460769c7c4ef9553335839c6eb1358d1 Parents: d6e6673 Author: Alan Conway <[email protected]> Authored: Fri Nov 18 15:15:39 2016 -0500 Committer: Alan Conway <[email protected]> Committed: Fri Nov 25 11:57:40 2016 -0500 ---------------------------------------------------------------------- tests/system_tests_sasl_plain.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/365f851d/tests/system_tests_sasl_plain.py ---------------------------------------------------------------------- diff --git a/tests/system_tests_sasl_plain.py b/tests/system_tests_sasl_plain.py index 1894f51..17ca86b 100644 --- a/tests/system_tests_sasl_plain.py +++ b/tests/system_tests_sasl_plain.py @@ -18,10 +18,8 @@ # import unittest, os, json -from time import sleep from subprocess import PIPE, Popen, STDOUT from system_test import TestCase, Qdrouterd, main_module, DIR, TIMEOUT, Process - from qpid_dispatch.management.client import Node class RouterTestPlainSaslCommon(TestCase): @@ -103,7 +101,8 @@ class RouterTestPlainSasl(RouterTestPlainSaslCommon): cls.routers[1].wait_router_connected('QDR.X') def test_inter_router_plain_exists(self): - """The setUpClass sets up two routers with SASL PLAIN enabled. + """ + Check authentication of inter-router link is PLAIN. This test makes executes a qdstat -c via an unauthenticated listener to QDR.X and makes sure that the output has an "inter-router" connection to @@ -535,7 +534,7 @@ class RouterTestVerifyHostNameNo(RouterTestPlainSaslCommon): ' saslPassword=password' json.loads(self.run_qdmanage(connector_create_command, address=self.routers[1].addresses[0])) - sleep(1) + self.routers[1].wait_connectors() local_node = Node.connect(self.routers[1].addresses[0], timeout=TIMEOUT) results = local_node.query(type='org.apache.qpid.dispatch.connection').results self.common_asserts(results) @@ -585,9 +584,7 @@ class RouterTestVerifyHostNameNo(RouterTestPlainSaslCommon): ' saslPassword=password' json.loads(self.run_qdmanage(connector_create_command, address=self.routers[1].addresses[0])) - - sleep(1) - + self.routers[1].wait_connectors() local_node = Node.connect(self.routers[1].addresses[0], timeout=TIMEOUT) results = local_node.query(type='org.apache.qpid.dispatch.connection').results --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
