Skip to content

Commit 770ff5a

Browse files
committed
8297215: Update libs tests to use @enablePreview
Reviewed-by: alanb, sspitsyn
1 parent c69aa42 commit 770ff5a

35 files changed

+99
-89
lines changed

Diff for: test/jdk/java/lang/Thread/BuilderTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
/**
2525
* @test
2626
* @summary Unit test for Thread.Builder
27-
* @compile --enable-preview -source ${jdk.version} BuilderTest.java
28-
* @run testng/othervm --enable-preview BuilderTest
27+
* @enablePreview
28+
* @run testng BuilderTest
2929
*/
3030

3131
import java.util.concurrent.*;

Diff for: test/jdk/java/lang/Thread/virtual/Collectable.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
/**
2525
* @test
2626
* @summary Test that virtual threads are GC'ed
27-
* @compile --enable-preview -source ${jdk.version} Collectable.java
28-
* @run testng/othervm --enable-preview Collectable
27+
* @enablePreview
28+
* @run testng Collectable
2929
*/
3030

3131
import java.lang.ref.WeakReference;

Diff for: test/jdk/java/lang/Thread/virtual/CustomScheduler.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
* @summary Test virtual threads using a custom scheduler
2727
* @requires vm.continuations
2828
* @modules java.base/java.lang:+open
29-
* @compile --enable-preview -source ${jdk.version} CustomScheduler.java
30-
* @run testng/othervm --enable-preview CustomScheduler
29+
* @enablePreview
30+
* @run testng CustomScheduler
3131
*/
3232

3333
import java.lang.reflect.Field;

Diff for: test/jdk/java/lang/Thread/virtual/GetStackTrace.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
* @summary Test Thread.getStackTrace to examine the stack trace of a virtual
2727
* thread and its carrier
2828
* @modules java.base/java.lang:+open
29-
* @compile --enable-preview -source ${jdk.version} GetStackTrace.java
30-
* @run testng/othervm --enable-preview GetStackTrace
29+
* @enablePreview
30+
* @run testng GetStackTrace
3131
*/
3232

3333
import java.util.Objects;

Diff for: test/jdk/java/lang/Thread/virtual/GetStackTraceWhenRunnable.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
* @test
2626
* @summary Test Thread::getStackTrace on a virtual thread that is runnable-unmounted
2727
* @requires vm.continuations
28-
* @compile --enable-preview -source ${jdk.version} GetStackTraceWhenRunnable.java
29-
* @run main/othervm --enable-preview -Djdk.virtualThreadScheduler.maxPoolSize=1 GetStackTraceWhenRunnable
28+
* @enablePreview
29+
* @run main/othervm -Djdk.virtualThreadScheduler.maxPoolSize=1 GetStackTraceWhenRunnable
3030
*/
3131

3232
import java.io.IOException;

Diff for: test/jdk/java/lang/Thread/virtual/HoldsLock.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,16 @@
2626
* @summary Test Thread.holdsLock when lock held by carrier thread
2727
* @requires vm.continuations
2828
* @modules java.base/java.lang:+open
29-
* @compile --enable-preview -source ${jdk.version} HoldsLock.java
30-
* @run testng/othervm --enable-preview HoldsLock
29+
* @enablePreview
30+
* @run testng HoldsLock
3131
*/
3232

3333
/**
3434
* @test
3535
* @summary Test Thread.holdsLock when lock held by carrier thread
3636
* @requires vm.continuations & vm.debug
3737
* @modules java.base/java.lang:+open
38-
* @compile --enable-preview -source ${jdk.version} HoldsLock.java
39-
* @run testng/othervm --enable-preview -XX:+UseHeavyMonitors HoldsLock
38+
* @run testng/othervm -XX:+UseHeavyMonitors HoldsLock
4039
*/
4140

4241
import java.lang.management.LockInfo;

Diff for: test/jdk/java/lang/Thread/virtual/JfrEvents.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
* @summary Basic test for JFR jdk.VirtualThreadXXX events
2727
* @requires vm.continuations
2828
* @modules jdk.jfr java.base/java.lang:+open
29-
* @compile --enable-preview -source ${jdk.version} JfrEvents.java
30-
* @run testng/othervm --enable-preview JfrEvents
29+
* @enablePreview
30+
* @run testng/othervm JfrEvents
3131
*/
3232

3333
import java.io.IOException;

Diff for: test/jdk/java/lang/Thread/virtual/Locking.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
* @test
2626
* @summary Test virtual threads using java.util.concurrent locks
2727
* @library /test/lib
28-
* @compile --enable-preview -source ${jdk.version} Locking.java
29-
* @run testng/othervm --enable-preview Locking
28+
* @enablePreview
29+
* @run testng Locking
3030
*/
3131

3232
import java.util.concurrent.atomic.AtomicBoolean;

Diff for: test/jdk/java/lang/Thread/virtual/ParkWithFixedThreadPool.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
* @summary Test virtual thread park when scheduler is a fixed thread pool
2727
* @requires vm.continuations
2828
* @modules java.base/java.lang:+open
29-
* @compile --enable-preview -source ${jdk.version} ParkWithFixedThreadPool.java
30-
* @run testng/othervm --enable-preview ParkWithFixedThreadPool
29+
* @enablePreview
30+
* @run testng ParkWithFixedThreadPool
3131
*/
3232
import java.util.concurrent.*;
3333
import java.util.concurrent.atomic.*;

Diff for: test/jdk/java/lang/Thread/virtual/Parking.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
* @test
2626
* @summary Test virtual threads using park/unpark
2727
* @library /test/lib
28-
* @compile --enable-preview -source ${jdk.version} Parking.java
29-
* @run testng/othervm --enable-preview Parking
28+
* @enablePreview
29+
* @run testng Parking
3030
*/
3131

3232
import java.time.Duration;

Diff for: test/jdk/java/lang/Thread/virtual/Reflection.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
* @summary Test virtual threads using core reflection
2727
* @modules java.base/java.lang:+open
2828
* @library /test/lib
29-
* @compile --enable-preview -source ${jdk.version} Reflection.java
30-
* @run testng/othervm --enable-preview Reflection
29+
* @enablePreview
30+
* @run testng Reflection
3131
*/
3232

3333
import java.lang.reflect.Constructor;

Diff for: test/jdk/java/lang/Thread/virtual/ShutdownHook.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
* @test
2626
* @library /test/lib
2727
* @summary Shutdown hook is called with virtual thread
28-
* @compile --enable-preview -source ${jdk.version} ShutdownHook.java
29-
* @run main/othervm --enable-preview ShutdownHook test
28+
* @enablePreview
29+
* @run main ShutdownHook test
3030
*/
3131

3232
import jdk.test.lib.process.OutputAnalyzer;

Diff for: test/jdk/java/lang/Thread/virtual/StackTraces.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
* @requires vm.continuations
2929
* @modules java.management
3030
* @library /test/lib
31-
* @compile --enable-preview -source ${jdk.version} StackTraces.java
32-
* @run testng/othervm --enable-preview StackTraces
33-
* @run testng/othervm --enable-preview -XX:+UnlockDiagnosticVMOptions -XX:+ShowCarrierFrames StackTraces
31+
* @enablePreview
32+
* @run testng StackTraces
33+
* @run testng/othervm -XX:+UnlockDiagnosticVMOptions -XX:+ShowCarrierFrames StackTraces
3434
*/
3535

3636
import java.lang.management.ManagementFactory;

Diff for: test/jdk/java/lang/Thread/virtual/ThreadLocals.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
* @test
2626
* @summary Test Virtual threads using thread locals
2727
* @library /test/lib
28-
* @compile --enable-preview -source ${jdk.version} ThreadLocals.java
29-
* @run testng/othervm --enable-preview ThreadLocals
28+
* @enablePreview
29+
* @run testng ThreadLocals
3030
*/
3131

3232
import jdk.test.lib.thread.VThreadRunner;

Diff for: test/jdk/java/lang/Thread/virtual/WaitNotify.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
* @test
2626
* @summary Test virtual threads using Object.wait/notifyAll
2727
* @library /test/lib
28-
* @compile --enable-preview -source ${jdk.version} WaitNotify.java
29-
* @run testng/othervm --enable-preview WaitNotify
28+
* @enablePreview
29+
* @run testng WaitNotify
3030
*/
3131

3232
import java.util.concurrent.Semaphore;

Diff for: test/jdk/java/lang/Thread/virtual/stress/GetStackTraceALot.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@
2626
* @summary Stress test asynchronous Thread.getStackTrace
2727
* @requires vm.debug != true & vm.continuations
2828
* @modules java.base/java.lang:+open
29-
* @compile --enable-preview -source ${jdk.version} GetStackTraceALot.java ../ThreadBuilders.java
30-
* @run main/othervm --enable-preview GetStackTraceALot
31-
*
29+
* @enablePreview
30+
* @compile GetStackTraceALot.java ../ThreadBuilders.java
31+
* @run main GetStackTraceALot
3232
*/
3333

3434
/**
3535
* @test
3636
* @requires vm.debug == true & vm.continuations
3737
* @modules java.base/java.lang:+open
38-
* @compile --enable-preview -source ${jdk.version} GetStackTraceALot.java ../ThreadBuilders.java
39-
* @run main/othervm/timeout=300 --enable-preview GetStackTraceALot 1000
38+
* @compile GetStackTraceALot.java ../ThreadBuilders.java
39+
* @run main/timeout=300 GetStackTraceALot 1000
4040
*/
4141

4242
import java.time.Duration;

Diff for: test/jdk/java/lang/runtime/SwitchBootstrapsTest.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@
3737

3838
/**
3939
* @test
40-
* @compile --enable-preview -source ${jdk.version} SwitchBootstrapsTest.java
41-
* @run testng/othervm --enable-preview SwitchBootstrapsTest
40+
* @enablePreview
41+
* @compile SwitchBootstrapsTest.java
42+
* @run testng/othervm SwitchBootstrapsTest
4243
*/
4344
@Test
4445
public class SwitchBootstrapsTest {

Diff for: test/jdk/java/net/Socket/Timeouts.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@
2626
* @bug 8221481
2727
* @library /test/lib
2828
* @build jdk.test.lib.Utils
29-
* @compile --enable-preview -source ${jdk.version} Timeouts.java
30-
* @run testng/othervm/timeout=180 --enable-preview Timeouts
29+
* @enablePreview
30+
* @compile Timeouts.java
31+
* @run testng/othervm/timeout=180 Timeouts
3132
* @summary Test Socket timeouts
3233
*/
3334

Diff for: test/jdk/java/net/vthread/HttpALot.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@
2828
* @requires vm.debug != true
2929
* @modules jdk.httpserver
3030
* @library /test/lib
31-
* @compile --enable-preview -source ${jdk.version} HttpALot.java
31+
* @enablePreview
3232
* @comment This test runs with -Dsun.net.httpserver.nodelay=true to enable TCP_NODELAY on the
3333
* sockets "accept()"ed by the HttpServer. This is to avoid occasional 40ms delays
3434
* receiving responses from the server on Linux.
3535
* @run main/othervm/timeout=600
36-
* --enable-preview
3736
* -Dsun.net.httpserver.nodelay=true
3837
* -Dsun.net.client.defaultConnectTimeout=5000
3938
* -Dsun.net.client.defaultReadTimeout=5000

Diff for: test/jdk/java/net/vthread/InterruptHttp.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@
2525
* @test
2626
* @summary Test that HTTP connections can be interrupted
2727
* @library /test/lib
28-
* @compile --enable-preview -source ${jdk.version} InterruptHttp.java
29-
* @run main/othervm --enable-preview InterruptHttp
28+
* @enablePreview
29+
* @compile InterruptHttp.java
30+
* @run main/othervm InterruptHttp
3031
*/
3132

3233
import java.io.Closeable;

Diff for: test/jdk/jdk/internal/vm/Continuation/Basic.java

+10-9
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,14 @@
3030
* @modules java.base/jdk.internal.vm
3131
* @build java.base/java.lang.StackWalkerHelper
3232
*
33-
* @run testng/othervm --enable-preview -Xint Basic
33+
* @enablePreview
34+
* @run testng/othervm -Xint Basic
3435
*
35-
* @run testng/othervm --enable-preview -Xcomp -XX:TieredStopAtLevel=3 -XX:CompileOnly=jdk/internal/vm/Continuation,Basic Basic
36-
* @run testng/othervm --enable-preview -Xcomp -XX:-TieredCompilation -XX:CompileOnly=jdk/internal/vm/Continuation,Basic Basic
37-
* @run testng/othervm --enable-preview -Xcomp -XX:-TieredCompilation -XX:CompileOnly=jdk/internal/vm/Continuation,Basic -XX:CompileCommand=exclude,Basic.manyArgsDriver Basic
38-
* @run testng/othervm --enable-preview -Xcomp -XX:-TieredCompilation -XX:CompileOnly=jdk/internal/vm/Continuation,Basic -XX:CompileCommand=exclude,jdk/internal/vm/Continuation.enter Basic
39-
* @run testng/othervm --enable-preview -Xcomp -XX:-TieredCompilation -XX:CompileOnly=jdk/internal/vm/Continuation,Basic -XX:CompileCommand=inline,jdk/internal/vm/Continuation.run Basic
36+
* @run testng/othervm -Xcomp -XX:TieredStopAtLevel=3 -XX:CompileOnly=jdk/internal/vm/Continuation,Basic Basic
37+
* @run testng/othervm -Xcomp -XX:-TieredCompilation -XX:CompileOnly=jdk/internal/vm/Continuation,Basic Basic
38+
* @run testng/othervm -Xcomp -XX:-TieredCompilation -XX:CompileOnly=jdk/internal/vm/Continuation,Basic -XX:CompileCommand=exclude,Basic.manyArgsDriver Basic
39+
* @run testng/othervm -Xcomp -XX:-TieredCompilation -XX:CompileOnly=jdk/internal/vm/Continuation,Basic -XX:CompileCommand=exclude,jdk/internal/vm/Continuation.enter Basic
40+
* @run testng/othervm -Xcomp -XX:-TieredCompilation -XX:CompileOnly=jdk/internal/vm/Continuation,Basic -XX:CompileCommand=inline,jdk/internal/vm/Continuation.run Basic
4041
*/
4142

4243
/**
@@ -46,9 +47,9 @@
4647
* @modules java.base/jdk.internal.vm
4748
* @build java.base/java.lang.StackWalkerHelper
4849
*
49-
* @run testng/othervm --enable-preview -XX:+VerifyStack -Xint Basic
50-
* @run testng/othervm --enable-preview -XX:+VerifyStack -Xcomp -XX:TieredStopAtLevel=3 -XX:CompileOnly=jdk/internal/vm/Continuation,Basic Basic
51-
* @run testng/othervm --enable-preview -XX:+VerifyStack -Xcomp -XX:-TieredCompilation -XX:CompileOnly=jdk/internal/vm/Continuation,Basic Basic
50+
* @run testng/othervm -XX:+VerifyStack -Xint Basic
51+
* @run testng/othervm -XX:+VerifyStack -Xcomp -XX:TieredStopAtLevel=3 -XX:CompileOnly=jdk/internal/vm/Continuation,Basic Basic
52+
* @run testng/othervm -XX:+VerifyStack -Xcomp -XX:-TieredCompilation -XX:CompileOnly=jdk/internal/vm/Continuation,Basic Basic
5253
*/
5354

5455
import jdk.internal.vm.Continuation;

Diff for: test/jdk/jdk/internal/vm/Continuation/ClassUnloading.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@
2626
* @summary Tests class unloading on virtual threads
2727
*
2828
* @requires vm.continuations
29-
* @compile --enable-preview -source ${jdk.version} ClassUnloading.java
30-
* @run main/othervm --enable-preview -XX:-UseCompressedOops ClassUnloading
31-
* @run main/othervm --enable-preview -XX:+UseCompressedOops ClassUnloading
32-
* @run main/othervm --enable-preview -Xcomp -XX:-TieredCompilation -XX:CompileOnly=jdk/internal/vm/Continuation,ClassUnloading ClassUnloading
29+
* @enablePreview
30+
* @compile ClassUnloading.java
31+
* @run main/othervm -XX:-UseCompressedOops ClassUnloading
32+
* @run main/othervm -XX:+UseCompressedOops ClassUnloading
33+
* @run main/othervm -Xcomp -XX:-TieredCompilation -XX:CompileOnly=jdk/internal/vm/Continuation,ClassUnloading ClassUnloading
3334
*/
3435

3536
// @run testng/othervm -Xcomp -XX:-TieredCompilation -XX:CompileOnly=jdk/internal/vm/Continuation,Basic Basic

Diff for: test/jdk/jdk/internal/vm/Continuation/HumongousStack.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@
2828
* @modules java.base/jdk.internal.vm
2929
*
3030
* @requires vm.gc.G1
31-
* @run main/othervm --enable-preview -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyContinuations -Xms2g -Xmx2g -XX:+UseG1GC -XX:G1HeapRegionSize=1m -Xss10m -Xint HumongousStack 5000
32-
* @run main/othervm --enable-preview -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyContinuations -Xms2g -Xmx2g -XX:+UseG1GC -XX:G1HeapRegionSize=1m -Xss10m -Xcomp -XX:TieredStopAtLevel=3 -XX:CompileOnly=jdk/internal/vm/Continuation,HumongousStack HumongousStack 10000
33-
* @run main/othervm --enable-preview -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyContinuations -Xms2g -Xmx2g -XX:+UseG1GC -XX:G1HeapRegionSize=1m -Xss10m -Xcomp -XX:-TieredCompilation -XX:CompileOnly=jdk/internal/vm/Continuation,HumongousStack HumongousStack 10000
31+
* @enablePreview
32+
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyContinuations -Xms2g -Xmx2g -XX:+UseG1GC -XX:G1HeapRegionSize=1m -Xss10m -Xint HumongousStack 5000
33+
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyContinuations -Xms2g -Xmx2g -XX:+UseG1GC -XX:G1HeapRegionSize=1m -Xss10m -Xcomp -XX:TieredStopAtLevel=3 -XX:CompileOnly=jdk/internal/vm/Continuation,HumongousStack HumongousStack 10000
34+
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyContinuations -Xms2g -Xmx2g -XX:+UseG1GC -XX:G1HeapRegionSize=1m -Xss10m -Xcomp -XX:-TieredCompilation -XX:CompileOnly=jdk/internal/vm/Continuation,HumongousStack HumongousStack 10000
3435
*/
3536

3637
import jdk.internal.vm.Continuation;

Diff for: test/jdk/jdk/internal/vm/Continuation/LiveFramesDriver.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
* @requires vm.continuations
2828
* @build java.base/java.lang.LiveFrames
2929
* @modules java.base/jdk.internal.vm
30-
*
31-
* @run main/othervm --enable-preview -XX:+UnlockDiagnosticVMOptions -Xint LiveFramesDriver
32-
* @run main/othervm --enable-preview -XX:+UnlockDiagnosticVMOptions -XX:-TieredCompilation -Xcomp -XX:CompileOnly=jdk/internal/vm/Continuation,java/lang/LiveFrames LiveFramesDriver
33-
* @run main/othervm --enable-preview -XX:+UnlockDiagnosticVMOptions -XX:+TieredCompilation -XX:TieredStopAtLevel=3 -Xcomp -XX:CompileOnly=jdk/internal/vm/Continuation,java/lang/LiveFrames LiveFramesDriver
30+
* @enablePreview
31+
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -Xint LiveFramesDriver
32+
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:-TieredCompilation -Xcomp -XX:CompileOnly=jdk/internal/vm/Continuation,java/lang/LiveFrames LiveFramesDriver
33+
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+TieredCompilation -XX:TieredStopAtLevel=3 -Xcomp -XX:CompileOnly=jdk/internal/vm/Continuation,java/lang/LiveFrames LiveFramesDriver
3434
*/
3535

3636

Diff for: test/jdk/jdk/internal/vm/Continuation/Scoped.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
* @requires vm.continuations
2828
* @modules java.base/jdk.internal.vm
2929
* @build java.base/java.lang.StackWalkerHelper
30-
*
31-
* @run testng/othervm --enable-preview -Xint Scoped
32-
* @run testng/othervm --enable-preview -Xcomp -XX:CompileOnly=jdk/internal/vm/Continuation,Scoped Scoped
30+
* @enablePreview
31+
* @run testng/othervm -Xint Scoped
32+
* @run testng/othervm -Xcomp -XX:CompileOnly=jdk/internal/vm/Continuation,Scoped Scoped
3333
*/
3434

3535
import jdk.internal.vm.Continuation;

Diff for: test/jdk/jdk/jfr/event/runtime/TestThreadEndEvent.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@
3737
* @key jfr
3838
* @requires vm.hasJFR & vm.continuations
3939
* @library /test/lib
40-
* @compile --enable-preview -source ${jdk.version} TestThreadEndEvent.java LatchedThread.java
41-
* @run main/othervm --enable-preview jdk.jfr.event.runtime.TestThreadEndEvent
40+
* @enablePreview
41+
* @compile TestThreadEndEvent.java LatchedThread.java
42+
* @run main/othervm jdk.jfr.event.runtime.TestThreadEndEvent
4243
*/
4344
public class TestThreadEndEvent {
4445
private final static String EVENT_NAME_THREAD_END = EventNames.ThreadEnd;

Diff for: test/jdk/jdk/jfr/event/runtime/TestThreadSleepEvent.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
* @key jfr
4141
* @requires vm.hasJFR & vm.continuations
4242
* @library /test/lib
43-
* @compile --enable-preview -source ${jdk.version} TestThreadSleepEvent.java
44-
* @run main/othervm --enable-preview jdk.jfr.event.runtime.TestThreadSleepEvent
43+
* @enablePreview
44+
* @run main/othervm jdk.jfr.event.runtime.TestThreadSleepEvent
4545
*/
4646
public class TestThreadSleepEvent {
4747

Diff for: test/jdk/jdk/jfr/event/runtime/TestThreadStartEvent.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@
3737
* @key jfr
3838
* @requires vm.hasJFR & vm.continuations
3939
* @library /test/lib
40-
* @compile --enable-preview -source ${jdk.version} TestThreadStartEvent.java LatchedThread.java
41-
* @run main/othervm --enable-preview jdk.jfr.event.runtime.TestThreadStartEvent
40+
* @enablePreview
41+
* @compile TestThreadStartEvent.java LatchedThread.java
42+
* @run main/othervm jdk.jfr.event.runtime.TestThreadStartEvent
4243
*/
4344
public class TestThreadStartEvent {
4445
private final static String EVENT_NAME_THREAD_START = EventNames.ThreadStart;

Diff for: test/jdk/jdk/jfr/event/runtime/TestVirtualThreadEndEvent.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@
3737
* @key jfr
3838
* @requires vm.hasJFR & vm.continuations
3939
* @library /test/lib
40-
* @compile --enable-preview -source ${jdk.version} TestVirtualThreadEndEvent.java LatchedThread.java
41-
* @run main/othervm --enable-preview jdk.jfr.event.runtime.TestVirtualThreadEndEvent
40+
* @enablePreview
41+
* @compile TestVirtualThreadEndEvent.java LatchedThread.java
42+
* @run main/othervm jdk.jfr.event.runtime.TestVirtualThreadEndEvent
4243
*/
4344
public class TestVirtualThreadEndEvent {
4445
private final static String EVENT_NAME_THREAD_END = EventNames.VirtualThreadEnd;

0 commit comments

Comments
 (0)