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

JDK-8273142 : Remove dependancy of TestHttpServer, HttpTransaction, HttpCallback from open/test/jdk/sun/net/www/protocol/http/ tests #5352

Closed
wants to merge 4 commits into from

Conversation

@mahendrachhipa
Copy link
Contributor

@mahendrachhipa mahendrachhipa commented Sep 2, 2021

Dependencies of TestHttpServre, HttpTransaction, HttpCallback are removed from following tests:
open/test/jdk/sun/net/www/protocol/http/ResponseCacheStream.java
open/test/jdk/sun/net/www/protocol/http/SetChunkedStreamingMode.java
open/test/jdk/sun/net/www/protocol/http/RelativeRedirect.java
open/test/jdk/sun/net/www/protocol/http/B6296310.java


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8273142: Remove dependancy of TestHttpServer, HttpTransaction, HttpCallback from open/test/jdk/sun/net/www/protocol/http/ tests

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5352/head:pull/5352
$ git checkout pull/5352

Update a local copy of the PR:
$ git checkout pull/5352
$ git pull https://git.openjdk.java.net/jdk pull/5352/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5352

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5352.diff

…ttpCallback from open/test/jdk/sun/net/www/protocol/http/ tests
@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Sep 2, 2021

👋 Welcome back mahendrachhipa! 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.

Loading

@openjdk openjdk bot added the rfr label Sep 2, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Sep 2, 2021

@mahendrachhipa 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.

Loading

@openjdk openjdk bot added the net label Sep 2, 2021
@mahendrachhipa mahendrachhipa changed the title JDK-8273142 : Remove dependancy of TestHttpServer, HttpTransaction, HttpCallback JDK-8273142 : Remove dependancy of TestHttpServer, HttpTransaction, HttpCallback from open/test/jdk/sun/net/www/protocol/http/ tests Sep 2, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Sep 2, 2021

Webrevs

Loading

trans.sendResponseHeaders(200, 0);
try(PrintWriter pw = new PrintWriter(trans.getResponseBody())) {
pw.print("");
}
Copy link
Member

@Michael-Mc-Mahon Michael-Mc-Mahon Sep 29, 2021

Choose a reason for hiding this comment

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

Not sure what the purpose of this block is, which apparently writes no bytes to the OutputStream?

Loading

Copy link
Contributor Author

@mahendrachhipa mahendrachhipa Sep 29, 2021

Choose a reason for hiding this comment

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

Hi @Michael-Mc-Mahon , In my understanding purpose of this block is to return a file with no contents.(Empty file).

Loading

Copy link
Member

@Michael-Mc-Mahon Michael-Mc-Mahon Sep 29, 2021

Choose a reason for hiding this comment

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

I think it would be simpler to replace lines 101-103 just with trans.close()

Loading

Copy link
Member

@dfuch dfuch Sep 30, 2021

Choose a reason for hiding this comment

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

Strictly speaking to preserve the current behavior - that would be trans.getResponseBody().close(); isn't it?

Loading

Copy link
Member

@Michael-Mc-Mahon Michael-Mc-Mahon Sep 30, 2021

Choose a reason for hiding this comment

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

HttpExchange.close() calls the close method on both streams and closing the output stream implicitly closes the input stream. So, they are equivalent.

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Sep 30, 2021

@mahendrachhipa 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:

8273142: Remove dependancy of TestHttpServer, HttpTransaction, HttpCallback from open/test/jdk/sun/net/www/protocol/http/ tests

Reviewed-by: michaelm

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

  • 94e31e5: 8274506: TestPids.java and TestPidsLimit.java fail with podman run as root
  • a8210c5: 8274401: C2: GraphKit::load_array_element bypasses Access API
  • dfc557c: 8274406: RunThese30M.java failed "assert(!LCA_orig->dominates(pred_block) || early->dominates(pred_block)) failed: early is high enough"
  • c0533ef: 8274522: java/lang/management/ManagementFactory/MXBeanException.java test fails with Shenandoah
  • f8415a9: 8274523: java/lang/management/MemoryMXBean/MemoryTest.java test should handle Shenandoah
  • 355356c: 8273435: Remove redundant zero-length check in ClassDesc.of
  • 97385d4: 8274405: Suppress warnings on non-serializable non-transient instance fields in javac and javadoc
  • 79cebe2: 8274050: Unnecessary Vector usage in javax.crypto
  • 97b2874: 8274509: Remove stray * and stylistic . from doc comments
  • b1b6696: 8274453: (sctp) com/sun/nio/sctp/SctpChannel/CloseDescriptors.java test should be resilient to lsof warnings
  • ... and 102 more: https://git.openjdk.java.net/jdk/compare/51085b523eb7f37c3af5b566b55eca37c127bdcf...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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@Michael-Mc-Mahon) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

Loading

@openjdk openjdk bot added the ready label Sep 30, 2021
@mahendrachhipa
Copy link
Contributor Author

@mahendrachhipa mahendrachhipa commented Sep 30, 2021

/integrate

Loading

@openjdk openjdk bot added the sponsor label Sep 30, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Sep 30, 2021

@mahendrachhipa
Your change (at version e8f3fba) is now ready to be sponsored by a Committer.

Loading

@mahendrachhipa
Copy link
Contributor Author

@mahendrachhipa mahendrachhipa commented Sep 30, 2021

/sponsor

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Sep 30, 2021

@mahendrachhipa Only Committers are allowed to sponsor changes.

Loading

@Michael-Mc-Mahon
Copy link
Member

@Michael-Mc-Mahon Michael-Mc-Mahon commented Sep 30, 2021

/sponsor

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Sep 30, 2021

Going to push as commit 2f955d6.
Since your change was applied there have been 112 commits pushed to the master branch:

  • 94e31e5: 8274506: TestPids.java and TestPidsLimit.java fail with podman run as root
  • a8210c5: 8274401: C2: GraphKit::load_array_element bypasses Access API
  • dfc557c: 8274406: RunThese30M.java failed "assert(!LCA_orig->dominates(pred_block) || early->dominates(pred_block)) failed: early is high enough"
  • c0533ef: 8274522: java/lang/management/ManagementFactory/MXBeanException.java test fails with Shenandoah
  • f8415a9: 8274523: java/lang/management/MemoryMXBean/MemoryTest.java test should handle Shenandoah
  • 355356c: 8273435: Remove redundant zero-length check in ClassDesc.of
  • 97385d4: 8274405: Suppress warnings on non-serializable non-transient instance fields in javac and javadoc
  • 79cebe2: 8274050: Unnecessary Vector usage in javax.crypto
  • 97b2874: 8274509: Remove stray * and stylistic . from doc comments
  • b1b6696: 8274453: (sctp) com/sun/nio/sctp/SctpChannel/CloseDescriptors.java test should be resilient to lsof warnings
  • ... and 102 more: https://git.openjdk.java.net/jdk/compare/51085b523eb7f37c3af5b566b55eca37c127bdcf...master

Your commit was automatically rebased without conflicts.

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Sep 30, 2021

@Michael-Mc-Mahon @mahendrachhipa Pushed as commit 2f955d6.

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

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants