diff --git a/codec/src/test/resources/io/netty/handler/codec/xml/sample-04.xml b/codec/src/test/resources/io/netty/handler/codec/xml/sample-04.xml index 8a75afccd6b..22b9d702b31 100644 --- a/codec/src/test/resources/io/netty/handler/codec/xml/sample-04.xml +++ b/codec/src/test/resources/io/netty/handler/codec/xml/sample-04.xml @@ -210,12 +210,6 @@ - - junit - junit - 4.12 - test - org.easymock easymock diff --git a/microbench/pom.xml b/microbench/pom.xml index 18aca81bcaa..32a26bfb089 100644 --- a/microbench/pom.xml +++ b/microbench/pom.xml @@ -185,16 +185,6 @@ junit-jupiter-engine compile - - org.junit.vintage - junit-vintage-engine - compile - - - junit - junit - compile - org.openjdk.jmh jmh-core diff --git a/pom.xml b/pom.xml index 512965f98a0..d2d22be0960 100644 --- a/pom.xml +++ b/pom.xml @@ -886,18 +886,6 @@ ${junit.version} test - - org.junit.vintage - junit-vintage-engine - ${junit.version} - test - - - junit - junit - 4.13.1 - test - ${project.groupId} netty-build-common @@ -1030,16 +1018,6 @@ junit-jupiter-params test - - org.junit.vintage - junit-vintage-engine - test - - - junit - junit - test - ${project.groupId} netty-build-common @@ -1148,6 +1126,12 @@ io.netty.util.internal.InternalThreadLocalMap Ignore cache padding. + + true + java.method.removed + method java.lang.String io.netty.testsuite.util.TestUtils::testMethodName(org.junit.rules.TestName) + This should be test-only, and we're removing support for JUnit 4. + diff --git a/testsuite-native/pom.xml b/testsuite-native/pom.xml index 8f4c534ad58..afba034fb3d 100644 --- a/testsuite-native/pom.xml +++ b/testsuite-native/pom.xml @@ -45,14 +45,6 @@ org.junit.jupiter junit-jupiter-engine - - org.junit.vintage - junit-vintage-engine - - - junit - junit - diff --git a/testsuite-shading/pom.xml b/testsuite-shading/pom.xml index 535552985ab..49d0f00f1c3 100644 --- a/testsuite-shading/pom.xml +++ b/testsuite-shading/pom.xml @@ -200,14 +200,6 @@ org.junit.jupiter junit-jupiter-engine - - org.junit.vintage - junit-vintage-engine - - - junit - junit - diff --git a/testsuite/pom.xml b/testsuite/pom.xml index f6dc457b86c..6e7813c9103 100644 --- a/testsuite/pom.xml +++ b/testsuite/pom.xml @@ -94,16 +94,6 @@ junit-jupiter-params compile - - org.junit.vintage - junit-vintage-engine - compile - - - junit - junit - compile - org.hamcrest hamcrest-library diff --git a/testsuite/src/main/java/io/netty/testsuite/transport/socket/DatagramUnicastIPv6Test.java b/testsuite/src/main/java/io/netty/testsuite/transport/socket/DatagramUnicastIPv6Test.java index 2235747e91a..308669c6f5a 100644 --- a/testsuite/src/main/java/io/netty/testsuite/transport/socket/DatagramUnicastIPv6Test.java +++ b/testsuite/src/main/java/io/netty/testsuite/transport/socket/DatagramUnicastIPv6Test.java @@ -18,8 +18,8 @@ import io.netty.channel.socket.InternetProtocolFamily; import io.netty.util.internal.PlatformDependent; import io.netty.util.internal.SuppressJava6Requirement; -import org.junit.AssumptionViolatedException; import org.junit.jupiter.api.BeforeAll; +import org.opentest4j.TestAbortedException; import java.io.IOException; import java.net.StandardProtocolFamily; @@ -38,7 +38,7 @@ public static void assumeIpv6Supported() { Channel channel = SelectorProvider.provider().openDatagramChannel(StandardProtocolFamily.INET6); channel.close(); } catch (UnsupportedOperationException e) { - throw new AssumptionViolatedException("IPv6 not supported", e); + throw new TestAbortedException("IPv6 not supported", e); } catch (IOException ignore) { // Ignore } diff --git a/testsuite/src/main/java/io/netty/testsuite/util/TestUtils.java b/testsuite/src/main/java/io/netty/testsuite/util/TestUtils.java index eeb37f2f9f5..f1192def7c5 100644 --- a/testsuite/src/main/java/io/netty/testsuite/util/TestUtils.java +++ b/testsuite/src/main/java/io/netty/testsuite/util/TestUtils.java @@ -21,7 +21,6 @@ import io.netty.util.internal.logging.InternalLogger; import io.netty.util.internal.logging.InternalLoggerFactory; import org.junit.jupiter.api.TestInfo; -import org.junit.rules.TestName; import org.tukaani.xz.LZMA2Options; import org.tukaani.xz.XZOutputStream; @@ -120,17 +119,6 @@ public String apply(Method method) { return testMethodName; } - /** - * Returns the method name of the current test. - */ - public static String testMethodName(TestName testName) { - String testMethodName = testName.getMethodName(); - if (testMethodName.contains("[")) { - testMethodName = testMethodName.substring(0, testMethodName.indexOf('[')); - } - return testMethodName; - } - public static void dump(String filenamePrefix) throws IOException { ObjectUtil.checkNotNull(filenamePrefix, "filenamePrefix"); diff --git a/transport-native-unix-common-tests/pom.xml b/transport-native-unix-common-tests/pom.xml index 0f56941dbcc..5743bdc0f9f 100644 --- a/transport-native-unix-common-tests/pom.xml +++ b/transport-native-unix-common-tests/pom.xml @@ -54,15 +54,5 @@ junit-jupiter-engine compile - - org.junit.vintage - junit-vintage-engine - compile - - - junit - junit - compile - diff --git a/transport-native-unix-common-tests/src/main/java/io/netty/channel/unix/tests/SocketTest.java b/transport-native-unix-common-tests/src/main/java/io/netty/channel/unix/tests/SocketTest.java index 115ab353958..c33afc2759b 100644 --- a/transport-native-unix-common-tests/src/main/java/io/netty/channel/unix/tests/SocketTest.java +++ b/transport-native-unix-common-tests/src/main/java/io/netty/channel/unix/tests/SocketTest.java @@ -17,10 +17,10 @@ import io.netty.channel.unix.Buffer; import io.netty.channel.unix.Socket; -import org.junit.AssumptionViolatedException; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.opentest4j.TestAbortedException; import java.io.IOException; import java.nio.ByteBuffer; @@ -127,10 +127,10 @@ public void testRawOpt() throws IOException { } protected int level() { - throw new AssumptionViolatedException("Not supported"); + throw new TestAbortedException("Not supported"); } protected int optname() { - throw new AssumptionViolatedException("Not supported"); + throw new TestAbortedException("Not supported"); } }