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

Remove the last references to JUnit 4 #12442

Merged
merged 1 commit into from Jun 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -210,12 +210,6 @@

<dependencies>
<!-- Testing frameworks and related dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
Expand Down
10 changes: 0 additions & 10 deletions microbench/pom.xml
Expand Up @@ -185,16 +185,6 @@
<artifactId>junit-jupiter-engine</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-core</artifactId>
Expand Down
28 changes: 6 additions & 22 deletions pom.xml
Expand Up @@ -886,18 +886,6 @@
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-build-common</artifactId>
Expand Down Expand Up @@ -1030,16 +1018,6 @@
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-build-common</artifactId>
Expand Down Expand Up @@ -1148,6 +1126,12 @@
<classQualifiedName>io.netty.util.internal.InternalThreadLocalMap</classQualifiedName>
<justification>Ignore cache padding.</justification>
</item>
<item>
<ignore>true</ignore>
<code>java.method.removed</code>
<old>method java.lang.String io.netty.testsuite.util.TestUtils::testMethodName(org.junit.rules.TestName)</old>
<justification>This should be test-only, and we're removing support for JUnit 4.</justification>
</item>
</differences>
</revapi.differences>
</analysisConfiguration>
Expand Down
8 changes: 0 additions & 8 deletions testsuite-native/pom.xml
Expand Up @@ -45,14 +45,6 @@
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
</dependencies>
<profiles>
<profile>
Expand Down
8 changes: 0 additions & 8 deletions testsuite-shading/pom.xml
Expand Up @@ -200,14 +200,6 @@
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
</dependencies>
<profiles>
<profile>
Expand Down
10 changes: 0 additions & 10 deletions testsuite/pom.xml
Expand Up @@ -94,16 +94,6 @@
<artifactId>junit-jupiter-params</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
Expand Down
Expand Up @@ -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;
Expand All @@ -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
}
Expand Down
12 changes: 0 additions & 12 deletions testsuite/src/main/java/io/netty/testsuite/util/TestUtils.java
Expand Up @@ -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;

Expand Down Expand Up @@ -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");
Expand Down
10 changes: 0 additions & 10 deletions transport-native-unix-common-tests/pom.xml
Expand Up @@ -54,15 +54,5 @@
<artifactId>junit-jupiter-engine</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
}
}