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

8186765: Speed up test sun/net/www/protocol/https/HttpsClient/ProxyAuthTest.java #10539

Closed
wants to merge 2 commits into from

Conversation

djelinski
Copy link
Member

@djelinski djelinski commented Oct 3, 2022

This PR reduces the execution time of ProxyAuthTest.

Before this change the test always required at least 3 minutes to complete (6x 30 seconds timeout in SSLSocketTemplate's sslServerSocket.accept()).
After this change the test does not open a server socket when it is not necessary.

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-8186765: Speed up test sun/net/www/protocol/https/HttpsClient/ProxyAuthTest.java

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10539

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

Using diff file

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

@djelinski
Copy link
Member Author

/issue add 8280104

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 3, 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 8186765 8186765: Speed up test sun/net/www/protocol/https/HttpsClient/ProxyAuthTest.java Oct 3, 2022
@openjdk
Copy link

openjdk bot commented Oct 3, 2022

@djelinski
Adding additional issue to issue list: 8280104: sun/net/www/protocol/https/HttpsClient/ProxyAuthTest.java fails with test timeout.

@openjdk
Copy link

openjdk bot commented Oct 3, 2022

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

  • net
  • security

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

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

mlbridge bot commented Oct 3, 2022

Webrevs

Copy link
Member

@dfuch dfuch left a comment

Choose a reason for hiding this comment

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

IIUC the test attempts to connect through a proxy to a server. The proxy needs Basic authentication. There is a system property that will allow/restrict which authentication scheme can be used with a proxy, and the test is run with various settings of that property. If the property doesn't allow the Basic authentication scheme, then the connection through the proxy will not succeed, and the proxy will never forward the request to the server.
So in the case where we expect that the client stack will reject the request (since the proxy wants Basic) there's no need to start the server - it will never receive any connection anyway.

This LGTM - but it might be good to have someone from security-dev chime in - I'm not too familiar with this SSLSocketTemplate class.

@openjdk
Copy link

openjdk bot commented Oct 3, 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:

8186765: Speed up test sun/net/www/protocol/https/HttpsClient/ProxyAuthTest.java

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 20 new commits pushed to the master branch:

  • 085949a: 8294712: G1: Use index-base iteration for G1FlushHumongousCandidateRemSets
  • b850f05: 8294758: JFR: Docs build fails after changes to RecordedObject and Timespan
  • 2dbedf0: 8294406: Test runtime/handshake/HandshakeDirectTest.java failed: JVMTI_ERROR_WRONG_PHASE
  • 4d6668e: 8294242: JFR: jfr print doesn't handle infinite duration well
  • 5a9cd33: 8294509: The sign extension bug applies to 'public static int[] convertSeedBytesToInts(byte[] seed, int n, int z)' in RandomSupport
  • f03934e: 8294578: [PPC64] C2: Missing is_oop information when using disjoint compressed oops mode
  • 3b476a1: 8292847: Zero: Allow ergonomics to select the GC
  • 16047e8: 8292780: misc tests failed "assert(false) failed: graph should be schedulable"
  • bf39b18: 8288302: Shenandoah: SIGSEGV in vm maybe related to jit compiling xerces
  • f957ce9: 8294564: IGV: IllegalArgumentException for "Difference to current graph"
  • ... and 10 more: https://git.openjdk.org/jdk/compare/46633e644a8ab94ceb75803bd40739214f8a60e8...master

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 3, 2022
@jaikiran
Copy link
Member

jaikiran commented Oct 4, 2022

Thank you Daniel for that explanation. Having looked at the test, it wasn't clear to me what exactly was being done/tested there.

@djelinski, the change looks fine to me. Although we now default to a well known port to which perhaps something already might be listening on a host, based on what Daniel noted, the request will never make it to that target - so this change will not introduce any intermittent failures from what I can see.

The copyright year on that test file will need an update.

@djelinski
Copy link
Member Author

Thanks, copyright updated.
Also I'm going to remove JDK-8280104 here; the timeout was not the only issue there.

/issue remove 8280104

@openjdk
Copy link

openjdk bot commented Oct 4, 2022

@djelinski
Removing additional issue from issue list: 8280104.

@djelinski
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Oct 5, 2022

Going to push as commit 43dbf58.
Since your change was applied there have been 27 commits pushed to the master branch:

  • 755958e: 8294376: Minimize disabled warnings in java.base
  • 1dafbe3: 8294539: Augment discussion of equivalence relations on floating-point values
  • b2e86a6: 8294255: Add link to DEFAULT_WAIT_TIME in javadoc for SunToolKit.realsSync
  • b22a38d: 8292309: Fix java/awt/PrintJob/ConstrainedPrintingTest/ConstrainedPrintingTest.java test
  • 121d4a5: 8293579: tools/jpackage/share/jdk/jpackage/tests/UnicodeArgsTest.java fails on Japanese Windows platform
  • 1166a8a: 8292214: Memory leak in getAllConfigs of awt_GraphicsEnv.c:386
  • 3644e26: 8294673: JFR: Add SecurityProviderService#threshold to TestActiveSettingEvent.java
  • 085949a: 8294712: G1: Use index-base iteration for G1FlushHumongousCandidateRemSets
  • b850f05: 8294758: JFR: Docs build fails after changes to RecordedObject and Timespan
  • 2dbedf0: 8294406: Test runtime/handshake/HandshakeDirectTest.java failed: JVMTI_ERROR_WRONG_PHASE
  • ... and 17 more: https://git.openjdk.org/jdk/compare/46633e644a8ab94ceb75803bd40739214f8a60e8...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Oct 5, 2022

@djelinski Pushed as commit 43dbf58.

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

@djelinski djelinski deleted the proxyauthtest-server branch October 5, 2022 06:52
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 security security-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

3 participants