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

chug 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 ffc4c9c  DISPATCH-1947: Add self test to verify that Q2 limit is in 
effect
ffc4c9c is described below

commit ffc4c9cc6d1871cf517754b5f060988229b6cec9
Author: Chuck Rolke <[email protected]>
AuthorDate: Tue Feb 23 17:09:09 2021 -0500

    DISPATCH-1947: Add self test to verify that Q2 limit is in effect
---
 tests/system_tests_tcp_adaptor.py | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/tests/system_tests_tcp_adaptor.py 
b/tests/system_tests_tcp_adaptor.py
index 09a50ec..bbe02dc 100644
--- a/tests/system_tests_tcp_adaptor.py
+++ b/tests/system_tests_tcp_adaptor.py
@@ -22,6 +22,7 @@ from __future__ import division
 from __future__ import absolute_import
 from __future__ import print_function
 
+import io
 import os
 import sys
 import time
@@ -678,6 +679,21 @@ class TcpAdaptor(TestCase):
             print(result)
             sys.stdout.flush()
         assert result is None, "TCP_TEST Stop %s FAIL: %s" % (name, result)
+
+        # search the router log file to verify Q2 was hit
+        time.sleep(0.005)  # wait for log file to be written
+        block_ct = 0
+        unblock_ct = 0
+        with io.open(self.INTA.logfile_path) as f:
+            for line in f:
+                if 'client link blocked on Q2 limit' in line:
+                    block_ct += 1
+                if 'client link unblocked from Q2 limit' in line:
+                    unblock_ct += 1
+        self.assertTrue(block_ct > 0)
+        self.assertEqual(block_ct, unblock_ct)
+
+
         self.logger.log("TCP_TEST Stop %s SUCCESS" % name)
 
     @SkipIfNeeded(DISABLE_SELECTOR_TESTS, DISABLE_SELECTOR_REASON)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to