You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ro...@apache.org on 2019/05/28 07:39:31 UTC
[james-project] 06/06: JAMES-2777 use junit 5 in server.task project
This is an automated email from the ASF dual-hosted git repository.
rouazana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit aa60bfbce8732b46de6ac7cc1d00dc0f2b354a17
Author: RĂ©mi Kowalski <rk...@linagora.com>
AuthorDate: Wed May 22 16:47:01 2019 +0200
JAMES-2777 use junit 5 in server.task project
---
server/task/pom.xml | 14 ++++++++++++--
.../org/apache/james/task/MemoryTaskManagerTest.java | 18 ++++++++----------
.../apache/james/task/MemoryTaskManagerWorkerTest.java | 2 +-
.../test/java/org/apache/james/task/TaskIdTest.java | 2 +-
.../src/test/java/org/apache/james/task/TaskTest.java | 2 +-
.../java/org/apache/james/task/TaskWithIdTest.java | 2 +-
6 files changed, 24 insertions(+), 16 deletions(-)
diff --git a/server/task/pom.xml b/server/task/pom.xml
index 3ade1a7..00bc8ad 100644
--- a/server/task/pom.xml
+++ b/server/task/pom.xml
@@ -41,8 +41,18 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-launcher</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.vintage</groupId>
+ <artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/server/task/src/test/java/org/apache/james/task/MemoryTaskManagerTest.java b/server/task/src/test/java/org/apache/james/task/MemoryTaskManagerTest.java
index 676071f..7b87080 100644
--- a/server/task/src/test/java/org/apache/james/task/MemoryTaskManagerTest.java
+++ b/server/task/src/test/java/org/apache/james/task/MemoryTaskManagerTest.java
@@ -30,28 +30,24 @@ import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicInteger;
-import org.assertj.core.api.JUnitSoftAssertions;
+import org.assertj.core.api.SoftAssertions;
import org.awaitility.Awaitility;
import org.awaitility.Duration;
import org.awaitility.core.ConditionFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
public class MemoryTaskManagerTest {
private MemoryTaskManager memoryTaskManager;
- @Rule
- public JUnitSoftAssertions softly = new JUnitSoftAssertions();
-
- @Before
+ @BeforeEach
public void setUp() {
memoryTaskManager = new MemoryTaskManager();
}
- @After
+ @AfterEach
public void tearDown() {
memoryTaskManager.stop();
}
@@ -231,6 +227,8 @@ public class MemoryTaskManagerTest {
@Test
public void listShouldReturnTaskStatus() throws Exception {
+ SoftAssertions softly = new SoftAssertions();
+
CountDownLatch latch1 = new CountDownLatch(1);
CountDownLatch latch2 = new CountDownLatch(1);
diff --git a/server/task/src/test/java/org/apache/james/task/MemoryTaskManagerWorkerTest.java b/server/task/src/test/java/org/apache/james/task/MemoryTaskManagerWorkerTest.java
index 10c4d6a..48d22fd 100644
--- a/server/task/src/test/java/org/apache/james/task/MemoryTaskManagerWorkerTest.java
+++ b/server/task/src/test/java/org/apache/james/task/MemoryTaskManagerWorkerTest.java
@@ -30,7 +30,7 @@ import java.util.function.Consumer;
import org.awaitility.Awaitility;
import org.awaitility.Duration;
import org.awaitility.core.ConditionFactory;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import reactor.core.publisher.Mono;
diff --git a/server/task/src/test/java/org/apache/james/task/TaskIdTest.java b/server/task/src/test/java/org/apache/james/task/TaskIdTest.java
index 24c3a03..0d22279 100644
--- a/server/task/src/test/java/org/apache/james/task/TaskIdTest.java
+++ b/server/task/src/test/java/org/apache/james/task/TaskIdTest.java
@@ -19,7 +19,7 @@
package org.apache.james.task;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import nl.jqno.equalsverifier.EqualsVerifier;
diff --git a/server/task/src/test/java/org/apache/james/task/TaskTest.java b/server/task/src/test/java/org/apache/james/task/TaskTest.java
index cd45aed..a293680 100644
--- a/server/task/src/test/java/org/apache/james/task/TaskTest.java
+++ b/server/task/src/test/java/org/apache/james/task/TaskTest.java
@@ -24,7 +24,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
import java.util.concurrent.atomic.AtomicInteger;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
public class TaskTest {
diff --git a/server/task/src/test/java/org/apache/james/task/TaskWithIdTest.java b/server/task/src/test/java/org/apache/james/task/TaskWithIdTest.java
index e66c436..a0a1ca0 100644
--- a/server/task/src/test/java/org/apache/james/task/TaskWithIdTest.java
+++ b/server/task/src/test/java/org/apache/james/task/TaskWithIdTest.java
@@ -21,7 +21,7 @@ package org.apache.james.task;
import static org.assertj.core.api.Assertions.assertThat;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
public class TaskWithIdTest {
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org