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

8301767: Convert virtual thread tests to JUnit #12426

Closed
wants to merge 7 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/jdk/java/lang/Thread/BuilderTest.java
Original file line number Diff line number Diff line change
@@ -291,7 +291,7 @@ void testPriority2() {
@Test
void testPriority3() {
Thread currentThread = Thread.currentThread();
assumeFalse(currentThread.isVirtual(), "Main test is a virtual thread");
assumeFalse(currentThread.isVirtual(), "Main thread is a virtual thread");

int maxPriority = currentThread.getThreadGroup().getMaxPriority();
int priority = Math.min(maxPriority + 1, Thread.MAX_PRIORITY);
2 changes: 0 additions & 2 deletions test/jdk/java/lang/Thread/UncaughtExceptionsTest.java
Original file line number Diff line number Diff line change
@@ -26,8 +26,6 @@
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
import org.junit.jupiter.params.provider.Arguments;
6 changes: 3 additions & 3 deletions test/jdk/java/lang/Thread/virtual/CustomScheduler.java
Original file line number Diff line number Diff line change
@@ -162,7 +162,7 @@ void testBadCarrier() {
@Test
void testParkWithInterruptSet() {
Thread carrier = Thread.currentThread();
assumeFalse(carrier.isVirtual(), "Main test is a virtual thread");
assumeFalse(carrier.isVirtual(), "Main thread is a virtual thread");
try {
var builder = ThreadBuilders.virtualThreadBuilder(Runnable::run);
Thread vthread = builder.start(() -> {
@@ -183,7 +183,7 @@ void testParkWithInterruptSet() {
@Test
void testTerminateWithInterruptSet() {
Thread carrier = Thread.currentThread();
assumeFalse(carrier.isVirtual(), "Main test is a virtual thread");
assumeFalse(carrier.isVirtual(), "Main thread is a virtual thread");
try {
var builder = ThreadBuilders.virtualThreadBuilder(Runnable::run);
Thread vthread = builder.start(() -> {
@@ -201,7 +201,7 @@ void testTerminateWithInterruptSet() {
*/
@Test
void testRunWithInterruptSet() throws Exception {
assumeFalse(Thread.currentThread().isVirtual(), "Main test is a virtual thread");
assumeFalse(Thread.currentThread().isVirtual(), "Main thread is a virtual thread");
Executor scheduler = (task) -> {
Thread.currentThread().interrupt();
task.run();