Skip to content

Commit 5e380d0

Browse files
committed
Cleanup usage of junit 4
1 parent b6732d2 commit 5e380d0

File tree

11 files changed

+40
-116
lines changed

11 files changed

+40
-116
lines changed

pom.xml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@
3737
<type>pom</type>
3838
<scope>import</scope>
3939
</dependency>
40-
<dependency>
41-
<groupId>org.junit.vintage</groupId>
42-
<artifactId>junit-vintage-engine</artifactId>
43-
<version>5.14.0</version>
44-
</dependency>
4540
<dependency>
4641
<groupId>com.github.ben-manes.caffeine</groupId>
4742
<artifactId>caffeine</artifactId>
@@ -58,6 +53,12 @@
5853
<artifactId>mockito-junit-jupiter</artifactId>
5954
<version>${mockito.version}</version>
6055
<scope>test</scope>
56+
<exclusions>
57+
<exclusion>
58+
<groupId>*</groupId>
59+
<artifactId>*</artifactId>
60+
</exclusion>
61+
</exclusions>
6162
</dependency>
6263
</dependencies>
6364
</dependencyManagement>
@@ -84,12 +85,6 @@
8485
</dependency>
8586

8687
<!-- Testing -->
87-
<dependency>
88-
<groupId>junit</groupId>
89-
<artifactId>junit</artifactId>
90-
<version>4.13.2</version>
91-
<scope>test</scope>
92-
</dependency>
9388
<dependency>
9489
<groupId>io.vertx</groupId>
9590
<artifactId>vertx-junit5</artifactId>

vertx-web-api-service/pom.xml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,17 @@
5555
<version>${project.version}</version>
5656
<scope>test</scope>
5757
</dependency>
58-
<dependency>
59-
<groupId>org.junit.jupiter</groupId>
60-
<artifactId>junit-jupiter</artifactId>
61-
<version>${junit5.version}</version>
62-
<scope>test</scope>
63-
</dependency>
6458
<dependency>
6559
<groupId>io.vertx</groupId>
6660
<artifactId>vertx-web-openapi-router</artifactId>
6761
<version>${project.version}</version>
6862
<type>test-jar</type>
6963
</dependency>
64+
<dependency>
65+
<groupId>org.mockito</groupId>
66+
<artifactId>mockito-core</artifactId>
67+
<scope>test</scope>
68+
</dependency>
7069
<dependency>
7170
<groupId>org.mockito</groupId>
7271
<artifactId>mockito-junit-jupiter</artifactId>

vertx-web-common/pom.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,4 @@
1313

1414
<artifactId>vertx-web-common</artifactId>
1515

16-
<dependencies>
17-
<!-- Testing -->
18-
<dependency>
19-
<groupId>io.vertx</groupId>
20-
<artifactId>vertx-unit</artifactId>
21-
<scope>test</scope>
22-
</dependency>
23-
</dependencies>
2416
</project>

vertx-web-graphql/pom.xml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@
5454
<artifactId>reactive-streams</artifactId>
5555
<version>1.0.3</version>
5656
</dependency>
57-
<dependency>
58-
<groupId>org.junit.vintage</groupId>
59-
<artifactId>junit-vintage-engine</artifactId>
60-
<scope>test</scope>
61-
</dependency>
6257
<dependency>
6358
<groupId>io.vertx</groupId>
6459
<artifactId>vertx-web-client</artifactId>
@@ -71,17 +66,6 @@
7166
<type>test-jar</type>
7267
<scope>test</scope>
7368
</dependency>
74-
<dependency>
75-
<groupId>io.vertx</groupId>
76-
<artifactId>vertx-junit5</artifactId>
77-
<scope>test</scope>
78-
</dependency>
79-
<dependency>
80-
<groupId>org.junit.jupiter</groupId>
81-
<artifactId>junit-jupiter-engine</artifactId>
82-
<version>5.14.0</version>
83-
<scope>test</scope>
84-
</dependency>
8569
</dependencies>
8670

8771
<build>

vertx-web-proxy/pom.xml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@
3737
<artifactId>vertx-http-proxy</artifactId>
3838
</dependency>
3939
<!-- Testing -->
40-
<dependency>
41-
<groupId>org.junit.vintage</groupId>
42-
<artifactId>junit-vintage-engine</artifactId>
43-
<scope>test</scope>
44-
</dependency>
4540
<dependency>
4641
<groupId>io.vertx</groupId>
4742
<artifactId>vertx-web-client</artifactId>
@@ -53,17 +48,6 @@
5348
<type>test-jar</type>
5449
<scope>test</scope>
5550
</dependency>
56-
<dependency>
57-
<groupId>io.vertx</groupId>
58-
<artifactId>vertx-junit5</artifactId>
59-
<scope>test</scope>
60-
</dependency>
61-
<dependency>
62-
<groupId>org.junit.jupiter</groupId>
63-
<artifactId>junit-jupiter-engine</artifactId>
64-
<version>5.14.0</version>
65-
<scope>test</scope>
66-
</dependency>
6751
</dependencies>
6852

6953
</project>

vertx-web-session-stores/vertx-web-sstore-cookie/pom.xml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@
2626
</licenses>
2727

2828
<dependencies>
29-
<dependency>
30-
<groupId>org.junit.vintage</groupId>
31-
<artifactId>junit-vintage-engine</artifactId>
32-
<scope>test</scope>
33-
</dependency>
3429
<dependency>
3530
<groupId>io.vertx</groupId>
3631
<artifactId>vertx-web</artifactId>
@@ -46,11 +41,6 @@
4641
<type>test-jar</type>
4742
<scope>test</scope>
4843
</dependency>
49-
<dependency>
50-
<groupId>io.vertx</groupId>
51-
<artifactId>vertx-unit</artifactId>
52-
<scope>test</scope>
53-
</dependency>
5444
</dependencies>
5545

5646
</project>

vertx-web-session-stores/vertx-web-sstore-cookie/src/test/java/io/vertx/ext/web/sstore/cookie/tests/CookieSessionCreateTest.java

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,28 @@
1616

1717
package io.vertx.ext.web.sstore.cookie.tests;
1818

19+
import io.vertx.core.Vertx;
1920
import io.vertx.core.json.JsonObject;
20-
import io.vertx.ext.unit.junit.RunTestOnContext;
21-
import io.vertx.ext.unit.junit.VertxUnitRunner;
2221
import io.vertx.ext.web.sstore.SessionStore;
2322
import io.vertx.ext.web.sstore.cookie.CookieSessionStore;
24-
import org.junit.Rule;
25-
import org.junit.Test;
26-
import org.junit.runner.RunWith;
23+
import org.junit.jupiter.api.Test;
2724

28-
import static org.junit.Assert.*;
25+
import static org.junit.jupiter.api.Assertions.*;
2926

3027
/**
3128
* @author <a href="mailto:plopes@redhat.com">Paulo Lopes</a>
3229
*/
33-
@RunWith(VertxUnitRunner.class)
3430
public class CookieSessionCreateTest {
3531

36-
@Rule
37-
public RunTestOnContext rule = new RunTestOnContext();
38-
3932
@Test
4033
public void testCreateStore() throws Exception {
41-
SessionStore store = SessionStore.create(rule.vertx(), new JsonObject().put("secret", "KeyboardCat!"));
42-
assertNotNull(store);
43-
assertTrue(store instanceof CookieSessionStore);
34+
Vertx vertx = Vertx.vertx();
35+
try {
36+
SessionStore store = SessionStore.create(vertx, new JsonObject().put("secret", "KeyboardCat!"));
37+
assertNotNull(store);
38+
assertInstanceOf(CookieSessionStore.class, store);
39+
} finally {
40+
vertx.close().await();
41+
}
4442
}
4543
}

vertx-web-session-stores/vertx-web-sstore-cookie/src/test/java/module-info.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@
1919
requires io.vertx.web.client;
2020
requires io.vertx.web.sstore.cookie;
2121
requires io.vertx.web.tests;
22-
requires junit;
23-
requires io.vertx.testing.unit;
2422
requires io.vertx.auth.common;
2523
requires io.netty.codec.http;
2624
requires io.vertx.core.tests;
27-
requires io.vertx.testing.junit5;
25+
requires io.vertx.testing.junit5;
2826
}

vertx-web-session-stores/vertx-web-sstore-redis/pom.xml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,9 @@
3737
</dependency>
3838
<dependency>
3939
<groupId>io.vertx</groupId>
40-
<artifactId>vertx-junit5</artifactId>
41-
<scope>test</scope>
42-
</dependency>
43-
<dependency>
44-
<groupId>org.testcontainers</groupId>
45-
<artifactId>testcontainers</artifactId>
46-
<version>${testcontainers.version}</version>
40+
<artifactId>vertx-web</artifactId>
41+
<type>test-jar</type>
42+
<version>${project.version}</version>
4743
<scope>test</scope>
4844
</dependency>
4945
<dependency>
@@ -52,10 +48,9 @@
5248
<scope>test</scope>
5349
</dependency>
5450
<dependency>
55-
<groupId>io.vertx</groupId>
56-
<artifactId>vertx-web</artifactId>
57-
<type>test-jar</type>
58-
<version>${project.version}</version>
51+
<groupId>org.testcontainers</groupId>
52+
<artifactId>testcontainers</artifactId>
53+
<version>${testcontainers.version}</version>
5954
<scope>test</scope>
6055
</dependency>
6156
</dependencies>

vertx-web-validation/pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@
3030
<version>${project.version}</version>
3131
<scope>test</scope>
3232
</dependency>
33-
<dependency>
34-
<groupId>io.vertx</groupId>
35-
<artifactId>vertx-junit5</artifactId>
36-
<version>${project.version}</version>
37-
<scope>test</scope>
38-
</dependency>
3933
<dependency>
4034
<groupId>org.slf4j</groupId>
4135
<artifactId>slf4j-api</artifactId>

0 commit comments

Comments
 (0)