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

8295777: java/net/httpclient/ConnectExceptionTest.java should not rely on system resolver #10811

Closed
wants to merge 1 commit into from

Conversation

djelinski
Copy link
Member

@djelinski djelinski commented Oct 21, 2022

This PR makes ConnectExceptionTest use a non-existent hosts file for name resolution.

The test verifies that the HttpClient throws a ConnectException in response to DNS resolution failures. Slow name resolution makes this test take more time to complete. With this patch applied, the test becomes independent from external DNS services.

The test continues to pass.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8295777: java/net/httpclient/ConnectExceptionTest.java should not rely on system resolver

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10811/head:pull/10811
$ git checkout pull/10811

Update a local copy of the PR:
$ git checkout pull/10811
$ git pull https://git.openjdk.org/jdk pull/10811/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10811

View PR using the GUI difftool:
$ git pr show -t 10811

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10811.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 21, 2022

👋 Welcome back djelinski! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot changed the title 8295777 8295777: java/net/httpclient/ConnectExceptionTest.java should not rely on system resolver Oct 21, 2022
@openjdk
Copy link

openjdk bot commented Oct 21, 2022

@djelinski The following label will be automatically applied to this pull request:

  • net

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the net net-dev@openjdk.org label Oct 21, 2022
@djelinski djelinski marked this pull request as ready for review October 21, 2022 10:14
@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 21, 2022
@mlbridge
Copy link

mlbridge bot commented Oct 21, 2022

Webrevs

@dfuch
Copy link
Member

dfuch commented Oct 21, 2022

Ok - so the expectation is that this test will never need to successfully resolve any address - right?
If so looks good.

@openjdk
Copy link

openjdk bot commented Oct 21, 2022

@djelinski This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8295777: java/net/httpclient/ConnectExceptionTest.java should not rely on system resolver

Reviewed-by: dfuchs, jpai

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 7 new commits pushed to the master branch:

  • 0c13d66: 8295530: Update Zlib Data Compression Library to Version 1.2.13
  • 15bebf9: 8295666: Linux x86 build fails after 8292591
  • 5064718: 8294460: CodeSection::alignment checks for CodeBuffer::SECT_STUBS incorrectly
  • 8b010e0: 8030616: sun/management/jmxremote/bootstrap/RmiBootstrapTest fails intermittently with cannot find a free port
  • b35922b: 8295714: GHA ::set-output is deprecated and will be removed
  • dfd2d83: 8295657: SA: Allow larger object alignments
  • a345df2: 8280131: jcmd reports "Module jdk.jfr not found." when "jdk.management.jfr" is missing

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 21, 2022
@djelinski
Copy link
Member Author

the expectation is that this test will never need to successfully resolve any address - right?

That's correct.

Thanks for the reviews!

/integrate

@openjdk
Copy link

openjdk bot commented Oct 24, 2022

Going to push as commit 65c84e0.
Since your change was applied there have been 17 commits pushed to the master branch:

  • 329b49a: 8266900: java/net/httpclient/ShortResponseBody.java fails on windows with java.io.IOException: Unable to establish loopback connection
  • aad81f2: 8293979: Resolve JVM_CONSTANT_Class references at CDS dump time
  • 7cbf672: 8295811: serviceability/sa/TestObjectAlignment.java fails on x86_32
  • adad59e: 8295762: [Vector API] Update generate_iota_indices for x86_32 after JDK-8293409
  • b5efa2a: 8294538: missing is_unloading() check in SharedRuntime::fixup_callers_callsite()
  • 6acbdb5: 8295427: popframe004: report more details on error
  • 902162c: 8295239: Refactor java/util/Formatter/Basic script into a Java native test launcher
  • f5dabf9: 8295088: Update External Spec page to show tabs for hosts
  • 2181042: 8295375: debug agent class tracking should not piggy back on the cbClassPrepare() callback
  • f41711e: 8295650: JFR: jfr scrub should warn if an event type doesn't exist
  • ... and 7 more: https://git.openjdk.org/jdk/compare/ef62b614d1760d198dcb7f5f0794fc3dc55587a7...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Oct 24, 2022
@openjdk openjdk bot closed this Oct 24, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 24, 2022
@openjdk
Copy link

openjdk bot commented Oct 24, 2022

@djelinski Pushed as commit 65c84e0.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@djelinski djelinski deleted the connectexception-test branch March 8, 2023 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated net net-dev@openjdk.org
3 participants