You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by jd...@apache.org on 2021/07/23 17:20:44 UTC

[qpid-dispatch] 01/02: DISPATCH-1619 Close connections created in system_test by wait_router_connected

This is an automated email from the ASF dual-hosted git repository.

jdanek pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git

commit 7aab3f37f20a356d475af0ac9b0397b15a24d6e8
Author: Jiri Daněk <jd...@redhat.com>
AuthorDate: Tue Jun 29 11:37:26 2021 +0200

    DISPATCH-1619 Close connections created in system_test by wait_router_connected
---
 tests/system_test.py           | 4 ++++
 tests/system_tests_qdmanage.py | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/system_test.py b/tests/system_test.py
index 94a6613..5e7697e 100755
--- a/tests/system_test.py
+++ b/tests/system_test.py
@@ -694,6 +694,7 @@ class Qdrouterd(Process):
         return self
 
     def is_router_connected(self, router_id, **retry_kwargs):
+        node = None
         try:
             self.management.read(identity="router.node/%s" % router_id)
             # TODO aconway 2015-01-29: The above check should be enough, we
@@ -705,6 +706,9 @@ class Qdrouterd(Process):
             return retry_exception(lambda: node.query('org.apache.qpid.dispatch.router'))
         except:
             return False
+        finally:
+            if node:
+                node.close()
 
     def wait_router_connected(self, router_id, **retry_kwargs):
         retry(lambda: self.is_router_connected(router_id), **retry_kwargs)
diff --git a/tests/system_tests_qdmanage.py b/tests/system_tests_qdmanage.py
index bf7ba39..7dd0f8f 100644
--- a/tests/system_tests_qdmanage.py
+++ b/tests/system_tests_qdmanage.py
@@ -100,7 +100,7 @@ class QdmanageTest(TestCase):
         return out
 
     def assert_entity_equal(self, expect, actual, copy=None):
-        """Copy keys in copy from actual to idenity, then assert maps equal."""
+        """Copy keys in copy from actual to identity, then assert maps equal."""
         if copy:
             for k in copy:
                 expect[k] = actual[k]

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