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

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


The following commit(s) were added to refs/heads/main by this push:
     new 967e00d  DISPATCH-2214: Reduce logging in tcp_adaptor self test
967e00d is described below

commit 967e00d14a1335557b1f3269e92d4e9020401c07
Author: Chuck Rolke <c...@apache.org>
AuthorDate: Wed Jul 28 09:47:46 2021 -0400

    DISPATCH-2214: Reduce logging in tcp_adaptor self test
    
     * Put restraints on echo tests startup wait loop
       Only poll N times; delay between polls
     * Print qdsdat address displays if polling fails
    
    This closes #1327
---
 tests/system_tests_tcp_adaptor.py | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/tests/system_tests_tcp_adaptor.py 
b/tests/system_tests_tcp_adaptor.py
index 71bce4c..fe26dd4 100644
--- a/tests/system_tests_tcp_adaptor.py
+++ b/tests/system_tests_tcp_adaptor.py
@@ -322,7 +322,7 @@ class TcpAdaptor(TestCase):
 
         # define logging levels
         cls.print_logs_server = False
-        cls.print_logs_client = True
+        cls.print_logs_client = False
         parent_path = os.path.dirname(os.getcwd())
         cls.logger = Logger(title="TcpAdaptor-testClass",
                             print_to_console=True,
@@ -505,6 +505,8 @@ class TcpAdaptor(TestCase):
 
         # wait for server addresses (mobile ES_<rtr>) to propagate to all 
interior routers
         interior_rtrs = [rtr for rtr in cls.router_order if 
rtr.startswith('I')]
+        poll_loops = 100
+        poll_loop_delay = 0.5  # seconds
         found_all = False
         while not found_all:
             found_all = True
@@ -528,6 +530,15 @@ class TcpAdaptor(TestCase):
                     unseen = [srv for srv in cls.router_order if "ES_" + srv 
not in seen]
                     cls.logger.log("TCP_TEST Router %s sees only %d of %d 
addresses. Waiting for %s" %
                                    (rtr, len(server_lines), 
len(cls.router_order), unseen))
+                if poll_loops == 1:
+                    # last poll loop
+                    for line in lines:
+                        cls.logger.log("TCP_TEST Router %s : %s" % (rtr, line))
+            poll_loops -= 1
+            if poll_loops == 0:
+                assert False, "TCP_TEST TCP_Adaptor test setup failed. Echo 
tests never executed."
+            else:
+                time.sleep(poll_loop_delay)
         cls.logger.log("TCP_TEST Done poll wait")
 
     @classmethod

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

Reply via email to