kgiusti commented on a change in pull request #1516:
URL: https://github.com/apache/qpid-dispatch/pull/1516#discussion_r807094965
##########
File path: tests/system_tests_http1_adaptor.py
##########
@@ -951,18 +964,8 @@ def test_02_backpressure_server(self):
server_listener.shutdown(socket.SHUT_RDWR)
server_listener.close()
- # search the router log file to verify Q2 was hit
-
- block_ct = 0
- unblock_ct = 0
- with io.open(self.INT_A.logfile_path) as f:
- for line in f:
- if 'server link blocked on Q2 limit' in line:
- block_ct += 1
- if 'server link unblocked from Q2 limit' in line:
- unblock_ct += 1
- self.assertTrue(block_ct > 0)
- self.assertEqual(block_ct, unblock_ct)
+ router.teardown()
+ self.check_logs("server", router.logfile_path)
Review comment:
> The way it is now, if test fails, router is not stopped.
@jiridanek I don't think that's the case - the per-test routers are created
using self.tester.qdrouterd() which inserts a teardown handler that gets
executed when the testcase exits. If the sub-test fails before explicitly
calling teardown then the tester teardown should do the cleanup, correct?
[see system_test.py
](https://github.com/apache/qpid-dispatch/blob/b7918db600decd9b610f8401ff306261674cfdb8/tests/system_test.py#L814)
##########
File path: tests/system_tests_http1_adaptor.py
##########
@@ -905,7 +918,7 @@ def test_02_backpressure_server(self):
client_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
Review comment:
Yeah while we don't want to leak sockets this particular set of tests
re-create the router and all the ephemeral ports for each test. That should
avoid the "socket in use" errors we've seen on other tests since in those
tests the TestServers use the same port # for all tests (since the router HTTP
server-facing connection configuration doesn't change for each individual
sub-test). When one of those TestServers is left running from a previous test
things get ugly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]