-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
8291226: Create Test Cases to cover scenarios for JDK-8278067 #9958
Conversation
👋 Welcome back rgangadhar! A progress list of the required criteria for merging this PR into |
@rgangadhar The following label will be automatically applied to this pull request:
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. |
Hi Michael, Daniel, JaiKiran Pai @Michael-Mc-Mahon Could you please review this changeset ? |
Webrevs
|
Hi Ramesh, thanks for taking this one on. Would it be possible to first improve formatting a bit more, to make this easier to review? For instance - indentation in java code overall the whole oprnjdk code base is 4 spaces, not 2. Also it might be more concise to use List & loops to construct the various arrays, rather than copy/pasting the same line over and over (more specifically things line the I also wonder about representing things as strings that get parsed and split later on. Wouldn't using structure records make it easier to understand? Also I wonder if having 150 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is a java file and should have a .java
extension.
1. Increased space from 2 to 4. 2. skipped test scenarios from 113 to 128 && 145 to 160
My Bad . Yes thank you @dfuch . done this change |
Renamed Methods like startScenario, runClient, startServer, connectToServerURL added final to constants Changed clientScenarios array Changed serverScenarios array added IllegalArgumentException Replaced TIMEOUT with CountDownLatch Added Comments
Removed White Spaces
avoided repetation of serverScenarios and clientScenarios array @dfuch thanks |
renamed method createServer name to executeServer
@dfuch : does it really required if we split scenarios into various test files ? how does it affect running ? could you pls explain. |
Added scenarios documentation and removed white spaces
Removed Whitespaces
@dfuch @Michael-Mc-Mahon : could you pls check latest changeset once ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I believe this is OK to integrate. I will run some tests before approving. Please obtain Michael's approval too before integrating.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine. I'll publish a PR soon to address JDK-8291638 which means I'll re-enable the disabled tests here.
@rgangadhar 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:
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 603 new commits pushed to the
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 (@dfuch, @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 |
My tests have all come back green so this good to go! If you need a sponsor then please drop a note here after integrating. |
/integrate |
@rgangadhar |
@dfuch : could you pls sponsor this integration ? |
/sponsor |
Going to push as commit 86ec158.
Your commit was automatically rebased without conflicts. |
@Michael-Mc-Mahon @rgangadhar Pushed as commit 86ec158. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
There are total 160 scenarios written with combination of client properties (Client Scenarios) and Server Response (Server Scenarios).
In tabular format, Client and Server scenarios along with expected output are documented here:Permalink
This Program Should be run mandatorily in othervm mode itself since it has system property changes so can't be clubbed with other scenarios. so each scenario should be run in individual JVM.
For each and every scenario, ServerSocket is created and waits for clients to connect to it.
isProxySet and serverReady are shared variables between server thread and client thread(main) and it should be set and reset to false for each and every scenario.
isProxySet and serverReady variables should be set by server thread before proceeding to client thread(main).
if isProxySet variable is set to true then client set the proxy value to url.openConnection(Proxy)
if (isProxySet) {
httpUrlConnection = (sun.net.www.protocol.http.HttpURLConnection) url .openConnection(new Proxy(Type.HTTP, new InetSocketAddress("localhost", SERVER_PORT))); }
else {
httpUrlConnection = (sun.net.www.protocol.http.HttpURLConnection) url.openConnection();
}
Program tries to fetch the Value of <Key, Value> Pairs of HashMap KeepAliveCache where Key is KeepAliveKey and Value is ClientVector KeepAliveTimeout is stored in Value ClientVector of HashMap KeepAliveCache.
if connection is cached then KeepAliveTimeout is stored in ClientVector. KeepAliveTimeout stored in Value(ClientVector) of HashMap KeepAliveCache is compared with Expected Value.
if connection is not cached then connection is terminated immediately.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/9958/head:pull/9958
$ git checkout pull/9958
Update a local copy of the PR:
$ git checkout pull/9958
$ git pull https://git.openjdk.org/jdk pull/9958/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 9958
View PR using the GUI difftool:
$ git pr show -t 9958
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/9958.diff