GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Use Junit5 (#748) · netty/netty-tcnative@7de1330

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • openssl-dynamic
    • pom.xml
    • src/test/java/io/netty/internal/tcnative
      • AbstractNativeTest.java
      • CertificateVerifierTest.java
  • pom.xml
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎openssl-dynamic/pom.xml‎

Copy file name to clipboardExpand all lines: openssl-dynamic/pom.xml
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,16 @@
161161
<artifactId>netty-tcnative-classes</artifactId>
162162
<version>${project.version}</version>
163163
</dependency>
164+
<dependency>
165+
<groupId>org.junit.jupiter</groupId>
166+
<artifactId>junit-jupiter-api</artifactId>
167+
<version>${junit.version}</version>
168+
</dependency>
169+
<dependency>
170+
<groupId>org.junit.jupiter</groupId>
171+
<artifactId>junit-jupiter-engine</artifactId>
172+
<version>${junit.version}</version>
173+
</dependency>
164174
</dependencies>
165175

166176
<profiles>
Collapse file

‎openssl-dynamic/src/test/java/io/netty/internal/tcnative/AbstractNativeTest.java‎

Copy file name to clipboardExpand all lines: openssl-dynamic/src/test/java/io/netty/internal/tcnative/AbstractNativeTest.java
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
*/
1616
package io.netty.internal.tcnative;
1717

18-
import org.junit.BeforeClass;
18+
19+
import org.junit.jupiter.api.BeforeAll;
1920

2021
import java.io.File;
2122

@@ -25,7 +26,7 @@
2526
*/
2627
public abstract class AbstractNativeTest {
2728

28-
@BeforeClass
29+
@BeforeAll
2930
public static void loadNativeLib() throws Exception {
3031
String testClassesRoot = AbstractNativeTest.class.getProtectionDomain().getCodeSource().getLocation().getFile();
3132
File[] directories = new File(testClassesRoot + File.separator + "META-INF" + File.separator + "native")
Collapse file

‎openssl-dynamic/src/test/java/io/netty/internal/tcnative/CertificateVerifierTest.java‎

Copy file name to clipboardExpand all lines: openssl-dynamic/src/test/java/io/netty/internal/tcnative/CertificateVerifierTest.java
+7-5Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@
1515
*/
1616
package io.netty.internal.tcnative;
1717

18-
import org.junit.Assert;
19-
import org.junit.Test;
18+
19+
import org.junit.jupiter.api.Test;
2020

2121
import java.lang.reflect.Field;
2222

23+
import static org.junit.jupiter.api.Assertions.assertFalse;
24+
import static org.junit.jupiter.api.Assertions.assertTrue;
25+
2326
public class CertificateVerifierTest extends AbstractNativeTest {
2427

2528
@Test
@@ -28,14 +31,13 @@ public void testValidErrorCode() throws Exception {
2831
for (Field field : fields) {
2932
if (field.isAccessible()) {
3033
int errorCode = field.getInt(null);
31-
Assert.assertTrue(
32-
"errorCode '" + errorCode + "' must be valid", CertificateVerifier.isValid(errorCode));
34+
assertTrue(CertificateVerifier.isValid(errorCode), "errorCode '" + errorCode + "' must be valid");
3335
}
3436
}
3537
}
3638

3739
@Test
3840
public void testNonValidErrorCode() {
39-
Assert.assertFalse(CertificateVerifier.isValid(Integer.MIN_VALUE));
41+
assertFalse(CertificateVerifier.isValid(Integer.MIN_VALUE));
4042
}
4143
}
Collapse file

‎pom.xml‎

Copy file name to clipboardExpand all lines: pom.xml
+14-7Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@
7070
<enforcer.plugin.version>1.4.1</enforcer.plugin.version>
7171
<maven.compiler.source>1.6</maven.compiler.source>
7272
<maven.compiler.target>1.6</maven.compiler.target>
73-
<netty.build.version>30</netty.build.version>
73+
<netty.build.version>31</netty.build.version>
74+
<junit.version>5.9.0</junit.version>
7475
<animal.sniffer.skip>true</animal.sniffer.skip>
7576
<forceAutogen>false</forceAutogen>
7677
<forceConfigure>false</forceConfigure>
@@ -245,12 +246,6 @@
245246
<exclude>**/*TestUtil*</exclude>
246247
</excludes>
247248
<runOrder>random</runOrder>
248-
<properties>
249-
<property>
250-
<name>listener</name>
251-
<value>io.netty.build.junit.TimedOutTestsListener</value>
252-
</property>
253-
</properties>
254249
<!-- Ensure the whole stacktrace is preserved when an exception is thrown. See https://issues.apache.org/jira/browse/SUREFIRE-1457 -->
255250
<trimStackTrace>false</trimStackTrace>
256251
</configuration>
@@ -477,6 +472,18 @@
477472
<version>${netty.build.version}</version>
478473
<scope>test</scope>
479474
</dependency>
475+
<dependency>
476+
<groupId>org.junit.jupiter</groupId>
477+
<artifactId>junit-jupiter-api</artifactId>
478+
<version>${junit.version}</version>
479+
<scope>test</scope>
480+
</dependency>
481+
<dependency>
482+
<groupId>org.junit.jupiter</groupId>
483+
<artifactId>junit-jupiter-engine</artifactId>
484+
<version>${junit.version}</version>
485+
<scope>test</scope>
486+
</dependency>
480487
</dependencies>
481488
<profiles>
482489
<profile>

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.