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

fix: correct connect timeout setting for ApacheHttpRequest #803

Merged
merged 7 commits into from Sep 4, 2019

Conversation

chingor13
Copy link
Collaborator

Fixes #799

@chingor13 chingor13 requested a review from a team as a code owner August 28, 2019 16:47
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 28, 2019
Copy link
Contributor

@elharo elharo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test?

@chingor13
Copy link
Collaborator Author

Same comment as in #804: The Apache HttpClient implementation does a great job and making itself uninspectable once initialized - we would need to test its behavior (or use reflection to look at internals).

For these transport adapters, we will need to set up an integration test that somehow ensures the desired behavior.

Copy link
Contributor

@elharo elharo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one initially seemed harder to test, but I think @chanseokoh had a really good idea in the bug report that will enable us to test this one by setting a low timeout and connecting to a non-existent site.

@chingor13 chingor13 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 29, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 30, 2019
@chingor13 chingor13 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 30, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 30, 2019
@chingor13 chingor13 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 30, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 31, 2019
@chingor13
Copy link
Collaborator Author

I'm not sure why this fails on windows, but it seems to be within the Apache adapter. We should be able to skip this test on windows.

@chingor13 chingor13 requested review from elharo and a team September 3, 2019 16:25
@@ -183,6 +187,23 @@ public void process(HttpRequest request, HttpContext context)
assertTrue("Expected to have called our test interceptor", interceptorCalled.get());
}

@Test(timeout = 10_000L)
public void testConnectTimeout() {
// Apache HttpClient doesn't appear to behave correctly on windows
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a bug filed against Apache we could reference here?

@chingor13 chingor13 merged commit df21ebc into googleapis:master Sep 4, 2019
@chingor13 chingor13 deleted the apache-connection-timeout branch September 4, 2019 15:33
clundin25 pushed a commit to clundin25/google-http-java-client that referenced this pull request Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression: connection timeout ignored in 1.31.0 while works in 1.27.0
4 participants