Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HttpClientTimeoutTests can occasionally fail due to unreachable network #5069

Closed
joakime opened this issue Jul 21, 2020 · 0 comments · Fixed by #5070
Closed

HttpClientTimeoutTests can occasionally fail due to unreachable network #5069

joakime opened this issue Jul 21, 2020 · 0 comments · Fixed by #5070
Assignees
Labels

Comments

@joakime
Copy link
Contributor

joakime commented Jul 21, 2020

Jetty version
9.4.x

Java version
11.0.7+

OS type/version
Linux

Description
The tests that utilize the IP 10.255.255.1 can sometimes result in an unexpected java.net.SocketException: Network is unreachable (connect failed) when the test is attempting to test for connect timeouts.

org.eclipse.jetty.http.client.HttpClientTimeoutTest.testConnectTimeoutIsCancelledByShorterRequestTimeout(Transport)[3]  Time elapsed: 0.006 s  <<< FAILURE!
org.opentest4j.AssertionFailedError: 
	at org.eclipse.jetty.http.client.HttpClientTimeoutTest.assumeConnectTimeout(HttpClientTimeoutTest.java:523)
	at org.eclipse.jetty.http.client.HttpClientTimeoutTest.testConnectTimeoutIsCancelledByShorterRequestTimeout(HttpClientTimeoutTest.java:345)
Caused by: java.net.SocketException: Network is unreachable (connect failed)
	at org.eclipse.jetty.http.client.HttpClientTimeoutTest.assumeConnectTimeout(HttpClientTimeoutTest.java:511)
	at org.eclipse.jetty.http.client.HttpClientTimeoutTest.testConnectTimeoutIsCancelledByShorterRequestTimeout(HttpClientTimeoutTest.java:345)

The method HttpClientTimeoutTest.assumeConnectTimeout() should be updated to handle this situation.

https://github.com/eclipse/jetty.project/blob/65de149f84b68e23fb2a2a849e80b06850c8cd29/tests/test-http-client-transport/src/test/java/org/eclipse/jetty/http/client/HttpClientTimeoutTest.java#L503-L525

@joakime joakime added the Test label Jul 21, 2020
@joakime joakime self-assigned this Jul 21, 2020
@joakime joakime added this to To do in Jetty 9.4.31 via automation Jul 21, 2020
joakime added a commit that referenced this issue Jul 21, 2020
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
@joakime joakime linked a pull request Jul 21, 2020 that will close this issue
@joakime joakime moved this from To do to In progress in Jetty 9.4.31 Jul 21, 2020
@joakime joakime moved this from In progress to Done in Jetty 9.4.31 Jul 22, 2020
@joakime joakime closed this as completed Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Jetty 9.4.31
  
Done
Development

Successfully merging a pull request may close this issue.

1 participant