jiridanek commented on a change in pull request #966:
URL: https://github.com/apache/qpid-dispatch/pull/966#discussion_r547417909
##########
File path: tests/system_tests_bad_configuration.py
##########
@@ -112,11 +113,11 @@ def wait_for_unresolvable_host(self):
with open('../setUpClass/test-router.log', 'r') as router_log:
log_lines = router_log.read().split("\n")
expected_errors = [
- "proton:io Name or service not known", # Linux
- "proton:io unknown node or service", # macOS
+ "Connection to %s" % self.unresolvable_host_name
Review comment:
Such error message does not necessarily has to be caused by unresolvable
host.
When I was looking into this due to the bubblewrap problem, I was thinking
that maybe I should skip the test if I get a failure when contacting a DNS
server (because without working DNS I can't properly test the unresolvable host
scenario). In the end I was able to get the test pass without modifying it.
I guess this change is OK, I believe the changed test is able to catch
pretty much the same bugs it could previously.
##########
File path: tests/system_tests_bad_configuration.py
##########
@@ -112,11 +113,11 @@ def wait_for_unresolvable_host(self):
with open('../setUpClass/test-router.log', 'r') as router_log:
log_lines = router_log.read().split("\n")
expected_errors = [
- "proton:io Name or service not known", # Linux
- "proton:io unknown node or service", # macOS
+ "Connection to %s" % self.unresolvable_host_name
]
errors_caught = [line for line in log_lines
- if any([expected_error in line for expected_error
in expected_errors])]
+ if any([expected_error in line for expected_error
in expected_errors])
+ and "failed" in line]
Review comment:
If you turn `expected_errors` list above into single `expected_error`
value, you can then simplify this into
```suggestion
if expected_error in line and "failed" in line]
```
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]