[ https://issues.apache.org/jira/browse/DISPATCH-1930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17342852#comment-17342852 ]
ASF GitHub Bot commented on DISPATCH-1930: ------------------------------------------ ganeshmurthy commented on a change in pull request #1212: URL: https://github.com/apache/qpid-dispatch/pull/1212#discussion_r630522947 ########## File path: tests/system_tests_bad_configuration.py ########## @@ -109,15 +109,23 @@ def wait_for_unresolvable_host(self): then it stops scheduling new attempts. :return: """ - with open(self.router.logfile_path, 'r') as router_log: - log_lines = router_log.read().split("\n") - expected_log_snip = "Connection to %s" % self.unresolvable_host_name - errors_caught = [line for line in log_lines if expected_log_snip in line and "failed" in line] - - self.error_caught = any(errors_caught) - - # If condition not yet satisfied and not exhausted max attempts, - # re-schedule the verification. + try: + with open(self.router.logfile_path, 'r') as router_log: + log_lines = router_log.read().split("\n") + expected_log_snip = "Connection to %s" % self.unresolvable_host_name + errors_caught = [line for line in log_lines if expected_log_snip in line and "failed" in line] + + self.error_caught = any(errors_caught) + + # If condition not yet satisfied and not exhausted max attempts, + # re-schedule the verification. + if self.waiting_for_error(): + self.attempts_made += 1 + self.schedule_timer() + except: Review comment: Will use IOError, thx -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > system_tests_bad_configuration failing on Fedora 33 > --------------------------------------------------- > > Key: DISPATCH-1930 > URL: https://issues.apache.org/jira/browse/DISPATCH-1930 > Project: Qpid Dispatch > Issue Type: Test > Components: Tests > Reporter: Ganesh Murthy > Assignee: Ganesh Murthy > Priority: Major > Fix For: 1.17.0 > > > {noformat} > [gmurthy@localhost build]$ /usr/bin/python > "/home/gmurthy/opensource/qpid-dispatch/build/tests/run.py" "-m" "unittest" > "-v" "system_tests_bad_configuration" > test_qdmanage_query > (system_tests_bad_configuration.RouterTestBadConfiguration) > Attempts to query the router after the error (or timeout) has occurred. ... ok > test_unresolvable_host_caught > (system_tests_bad_configuration.RouterTestBadConfiguration) > Validate if the error message stating host is unresolvable is printed ... > FAILRouter QDR.A debug dump file: > >>>> > alloc.c: Items of type 'qd_timer_t' remain allocated at shutdown: 1 > (SUPPRESSED) > alloc.c: Items of type 'qd_connector_t' remain allocated at shutdown: 1 > (SUPPRESSED)<<<< > test_verify_reject_id_with_ctrl_char > (system_tests_bad_configuration.RouterTestIdFailCtrlChar) > Writes illegal config, runs router, examines console output ... ok > test_verify_reject_id_with_whitespace > (system_tests_bad_configuration.RouterTestIdFailWhiteSpace) > Writes illegal config, runs router, examines console output ... ok > ====================================================================== > FAIL: test_unresolvable_host_caught > (system_tests_bad_configuration.RouterTestBadConfiguration) > Validate if the error message stating host is unresolvable is printed > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/home/gmurthy/opensource/qpid-dispatch/tests/system_tests_bad_configuration.py", > line 143, in test_unresolvable_host_caught > self.assertTrue(self.error_caught) > AssertionError: False is not true > ---------------------------------------------------------------------- > Ran 4 tests in 20.789sFAILED (failures=1) > Exception in thread Thread-41: > Traceback (most recent call last): > File "/usr/lib64/python3.9/threading.py", line 954, in _bootstrap_inner > self.run() > File "/usr/lib64/python3.9/threading.py", line 1266, in run > self.function(*self.args, **self.kwargs) > File > "/home/gmurthy/opensource/qpid-dispatch/tests/system_tests_bad_configuration.py", > line 113, in wait_for_unresolvable_host > with open('../setUpClass/test-router.log', 'r') as router_log: > FileNotFoundError: [Errno 2] No such file or directory: > '../setUpClass/test-router.log' > Exception in thread Thread-42: > Traceback (most recent call last): > File "/usr/lib64/python3.9/threading.py", line 954, in _bootstrap_inner > self.run() > File "/usr/lib64/python3.9/threading.py", line 1266, in run > self.function(*self.args, **self.kwargs) > File > "/home/gmurthy/opensource/qpid-dispatch/tests/system_tests_bad_configuration.py", > line 113, in wait_for_unresolvable_host > with open('../setUpClass/test-router.log', 'r') as router_log: > FileNotFoundError: [Errno 2] No such file or directory: > '../setUpClass/test-router.log' > [gmurthy@localhost build]$ > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org