-
Notifications
You must be signed in to change notification settings - Fork 5.8k
JDK-8297215: Update libs tests to use @enablePreview #11222
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
Conversation
👋 Welcome back darcy! A progress list of the required criteria for merging this PR into |
@jddarcy The following labels 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 lists. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
* @run testng/othervm --enable-preview BuilderTest | ||
* @enablePreview | ||
* @compile BuilderTest.java | ||
* @run testng/othervm BuilderTest |
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.
I assume @compile
can be dropped from most of these tests now. Also I think /othervm can be dropped too because jtreg will always use othervm for tests that require --enable-preview. When the feature becomes permanent then it would mean dropping the @enablePreview
tag, no other changes.
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.
Right; ideally when the feature becomes non-preview the test update would just be removing the "@enablePreview" line. I didn't author these tests so I initially left any "othervm" directives in place since they aren't incorrect, just at worst a bit inefficient.
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.
@enablePreview
wasn't available when most of these tests were initially created. I changed some of to use this tag as part of other changes but didn't cover over the remaining tests that still use @compile --enable-preview -source ${jdk.version} ...
and @run main/othervm --enable-preview ...
. I just scanned the tests in test/jdk/java/lang/Thread/virtual and they can all be changed the same way, if you want. If you leave it then we'll just change them at the next edit in this area.
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.
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.
Most of the tests in test/jdk/java/lang/Thread/virtual/ still have @compile
and othervm, is it possible you didn't push the update with those changes?
* @run testng/othervm --enable-preview JfrEvents | ||
* @enablePreview | ||
* @compile JfrEvents.java | ||
* @run testng/othervm JfrEvents |
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 one needs to be /othervm.
* @compile --enable-preview -source ${jdk.version} Timeouts.java | ||
* @run testng/othervm/timeout=180 --enable-preview Timeouts | ||
* @enablePreview | ||
* @compile Timeouts.java |
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.
I assume the @compile
can be dropped from this one, doesn't matter.
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.
Latest update looks good, will make the test changes easy when features move from preview to permanent.
@jddarcy 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 1 new commit pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
* @compile --enable-preview -source ${jdk.version} GetStackTraceWhenRunnable.java | ||
* @run main/othervm --enable-preview -Djdk.virtualThreadScheduler.maxPoolSize=1 GetStackTraceWhenRunnable | ||
* @enablePreview | ||
* @compile GetStackTraceWhenRunnable.java |
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.
Nit: Is the line 29 for compiling necessary?
@@ -34,7 +34,7 @@ | |||
* @requires vm.continuations | |||
* @library /test/lib | |||
* @run build TestClass1 TestClass2 TestClass3 | |||
* @compile --enable-preview -source ${jdk.version} ParallelTransformerLoaderTest.java | |||
* @compile --enable-preview -source ${jdk.version} ParallelTransformerLoaderTest.java |
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.
Nit: This change is strange. It is either not needed or missing something.
* @compile --enable-preview -source ${jdk.version} SwitchBootstrapsTest.java | ||
* @run testng/othervm --enable-preview SwitchBootstrapsTest | ||
* @enablePreview | ||
* @compile SwitchBootstrapsTest.java |
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.
Nit: Is the line 41 for compiling necessary?
@@ -28,12 +28,12 @@ | |||
* @requires vm.debug != true | |||
* @modules jdk.httpserver | |||
* @library /test/lib | |||
* @compile --enable-preview -source ${jdk.version} HttpALot.java | |||
* @enablePreview | |||
* @compile HttpALot.java |
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.
Nit: Is the line 32 for compiling necessary?
* @compile --enable-preview -source ${jdk.version} InterruptHttp.java | ||
* @run main/othervm --enable-preview InterruptHttp | ||
* @enablePreview | ||
* @compile InterruptHttp.java |
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.
Nit: Is the line 29 for compiling necessary?
* @compile --enable-preview -source ${jdk.version} TestThreadSleepEvent.java | ||
* @run main/othervm --enable-preview jdk.jfr.event.runtime.TestThreadSleepEvent | ||
* @enablePreview | ||
* @compile TestThreadSleepEvent.java |
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.
Nit: Is the line 44 for compiling necessary?
* @compile --enable-preview -source ${jdk.version} TestManyVirtualThreads.java | ||
* @run main/othervm --enable-preview jdk.jfr.threading.TestManyVirtualThreads | ||
* @enablePreview | ||
* @compile TestManyVirtualThreads.java |
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.
Nit: Not sure the line 47 for compiling is necessary?
* @compile --enable-preview -source ${jdk.version} TestNestedVirtualThreads.java | ||
* @run main/othervm --enable-preview jdk.jfr.threading.TestNestedVirtualThreads | ||
* @enablePreview | ||
* @compile TestNestedVirtualThreads.java |
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.
Nit: Not sure the line 45 for compiling is necessary?
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.
Looks good.
Posted several nits though.
Thanks,
Serguei
* @compile --enable-preview -source ${jdk.version} TestDeepVirtualStackTrace.java | ||
* @run main/othervm --enable-preview -XX:FlightRecorderOptions:stackdepth=2048 | ||
* @enablePreview | ||
* @compile TestDeepVirtualStackTrace.java |
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.
Is compilation needed here?
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.
For the two tests that compiled a single file, I removed the @compile directive. Any additional refactoring left for future work.
/integrate |
Similar to an update recently done for langtools tests, update the libraries regression tests to take advantage of the @enablePreview jtreg feature.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/11222/head:pull/11222
$ git checkout pull/11222
Update a local copy of the PR:
$ git checkout pull/11222
$ git pull https://git.openjdk.org/jdk pull/11222/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 11222
View PR using the GUI difftool:
$ git pr show -t 11222
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/11222.diff