You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2020/12/22 16:32:34 UTC
[GitHub] [qpid-dispatch] ChugR opened a new pull request #966: DISPATCH-1901: Allow any proton:io reason failing connection to bad host name
ChugR opened a new pull request #966:
URL: https://github.com/apache/qpid-dispatch/pull/966
The system_tests_bad_configuration test sets up a connector to a
host that is never reachable. The test expects the connection to fail.
On Linux proton normally returns 'Name or service not known'. On macOS
there is some other specific reason.
Another class of errors shows up when DNS is unavailable. On Linux the
reason is 'Temporary failure in name resolution'.
This patch stops looking for specific text from the proton:io error
messages. The test declares success when a qpid-dispatch log message
indicates a connection failure to the host in question.
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org
[GitHub] [qpid-dispatch] jiridanek commented on a change in pull request #966: DISPATCH-1901: Allow any proton:io reason failing connection to bad host name
Posted by GitBox <gi...@apache.org>.
jiridanek commented on a change in pull request #966:
URL: https://github.com/apache/qpid-dispatch/pull/966#discussion_r547421859
##########
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]
self.error_caught = any(errors_caught)
Review comment:
Just a thought. The test does not check that Dispatch tries to connect repeatedly; it is enough to see the log line once.
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org
[GitHub] [qpid-dispatch] ChugR commented on a change in pull request #966: DISPATCH-1901: Allow any proton:io reason failing connection to bad host name
Posted by GitBox <gi...@apache.org>.
ChugR commented on a change in pull request #966:
URL: https://github.com/apache/qpid-dispatch/pull/966#discussion_r547985643
##########
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:
cleaned up
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org
[GitHub] [qpid-dispatch] ChugR commented on a change in pull request #966: DISPATCH-1901: Allow any proton:io reason failing connection to bad host name
Posted by GitBox <gi...@apache.org>.
ChugR commented on a change in pull request #966:
URL: https://github.com/apache/qpid-dispatch/pull/966#discussion_r547988500
##########
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]
self.error_caught = any(errors_caught)
Review comment:
The connection retry is on a five second cadence today. The test polls more often than that and should see the first failed connection. The code accepts one or more logs indicating failure.
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org
[GitHub] [qpid-dispatch] jiridanek commented on a change in pull request #966: DISPATCH-1901: Allow any proton:io reason failing connection to bad host name
Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org
[GitHub] [qpid-dispatch] jiridanek commented on a change in pull request #966: DISPATCH-1901: Allow any proton:io reason failing connection to bad host name
Posted by GitBox <gi...@apache.org>.
jiridanek commented on a change in pull request #966:
URL: https://github.com/apache/qpid-dispatch/pull/966#discussion_r548030509
##########
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]
self.error_caught = any(errors_caught)
Review comment:
Yeah, thats what I meant. If dispatch (due to a bug) stopped retrying the connection, the test would still pass.
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org
[GitHub] [qpid-dispatch] asfgit closed pull request #966: DISPATCH-1901: Allow any proton:io reason failing connection to bad host name
Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #966:
URL: https://github.com/apache/qpid-dispatch/pull/966
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org