diff --git a/test/lib-test/TEST.ROOT b/test/lib-test/TEST.ROOT index f23d38c1e66..33c9a9c2a43 100644 --- a/test/lib-test/TEST.ROOT +++ b/test/lib-test/TEST.ROOT @@ -31,6 +31,9 @@ keys=randomness # Minimum jtreg version requiredVersion=8.2.1+1 +# Prevent TestNG-based tests under this root, use @run junit actions instead +disallowedActions=testng + # Allow querying of various System properties in @requires clauses requires.extraPropDefns = ../jtreg-ext/requires/VMProps.java requires.extraPropDefns.bootlibs = ../lib/jdk/test/whitebox diff --git a/test/lib-test/jdk/test/lib/jittester/MethodTemplateTest.java b/test/lib-test/jdk/test/lib/jittester/MethodTemplateTest.java index 3cee24b4684..69751bc281c 100644 --- a/test/lib-test/jdk/test/lib/jittester/MethodTemplateTest.java +++ b/test/lib-test/jdk/test/lib/jittester/MethodTemplateTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2025, 2026, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ package jdk.test.lib.jittester; import java.lang.reflect.Executable; -import org.testng.annotations.Test; -import static org.testng.Assert.*; +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.*; /* * @test @@ -35,7 +35,7 @@ import static org.testng.Assert.*; * @library /test/lib * /test/hotspot/jtreg/testlibrary/jittester/src * - * @run testng jdk.test.lib.jittester.MethodTemplateTest + * @run junit jdk.test.lib.jittester.MethodTemplateTest */ public class MethodTemplateTest {