You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by gn...@apache.org on 2020/07/27 15:39:29 UTC
[camel] 42/43: [CAMEL-11807] Upgrade camel-threadpoolfactory-vertx
to junit5
This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 267d51d56803b879a38721827660e8d9fecebc58
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Mon Jul 27 16:52:30 2020 +0200
[CAMEL-11807] Upgrade camel-threadpoolfactory-vertx to junit5
---
components/camel-threadpoolfactory-vertx/pom.xml | 6 +++---
.../org/apache/camel/reactive/SplitCustomThreadPoolTest.java | 9 +++++----
.../org/apache/camel/reactive/SplitParallelLookupVertxTest.java | 9 +++++----
.../test/java/org/apache/camel/reactive/SplitParallelTest.java | 9 +++++----
4 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/components/camel-threadpoolfactory-vertx/pom.xml b/components/camel-threadpoolfactory-vertx/pom.xml
index 45fde68..6c6552d 100644
--- a/components/camel-threadpoolfactory-vertx/pom.xml
+++ b/components/camel-threadpoolfactory-vertx/pom.xml
@@ -54,7 +54,7 @@
<!-- testing -->
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-test</artifactId>
+ <artifactId>camel-test-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
@@ -68,8 +68,8 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/components/camel-threadpoolfactory-vertx/src/test/java/org/apache/camel/reactive/SplitCustomThreadPoolTest.java b/components/camel-threadpoolfactory-vertx/src/test/java/org/apache/camel/reactive/SplitCustomThreadPoolTest.java
index 2888df0..a3639af 100644
--- a/components/camel-threadpoolfactory-vertx/src/test/java/org/apache/camel/reactive/SplitCustomThreadPoolTest.java
+++ b/components/camel-threadpoolfactory-vertx/src/test/java/org/apache/camel/reactive/SplitCustomThreadPoolTest.java
@@ -21,9 +21,10 @@ import org.apache.camel.CamelContext;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.builder.ThreadPoolProfileBuilder;
import org.apache.camel.reactive.vertx.VertXThreadPoolFactory;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Assert;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
public class SplitCustomThreadPoolTest extends CamelTestSupport {
@@ -67,7 +68,7 @@ public class SplitCustomThreadPoolTest extends CamelTestSupport {
.to("log:bar")
.process(e -> {
String name = Thread.currentThread().getName();
- Assert.assertTrue("Should use Camel thread", name.startsWith("Camel"));
+ assertTrue(name.startsWith("Camel"), "Should use Camel thread");
})
.to("mock:split")
.end()
diff --git a/components/camel-threadpoolfactory-vertx/src/test/java/org/apache/camel/reactive/SplitParallelLookupVertxTest.java b/components/camel-threadpoolfactory-vertx/src/test/java/org/apache/camel/reactive/SplitParallelLookupVertxTest.java
index 39ec41f..5972a17 100644
--- a/components/camel-threadpoolfactory-vertx/src/test/java/org/apache/camel/reactive/SplitParallelLookupVertxTest.java
+++ b/components/camel-threadpoolfactory-vertx/src/test/java/org/apache/camel/reactive/SplitParallelLookupVertxTest.java
@@ -19,9 +19,10 @@ package org.apache.camel.reactive;
import io.vertx.core.Vertx;
import org.apache.camel.CamelContext;
import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Assert;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
public class SplitParallelLookupVertxTest extends CamelTestSupport {
@@ -57,7 +58,7 @@ public class SplitParallelLookupVertxTest extends CamelTestSupport {
.to("log:bar")
.process(e -> {
String name = Thread.currentThread().getName();
- Assert.assertTrue("Should use vertx thread", name.startsWith("vert.x-worker-thread"));
+ assertTrue(name.startsWith("vert.x-worker-thread"), "Should use vertx thread");
})
.to("mock:split")
.end()
diff --git a/components/camel-threadpoolfactory-vertx/src/test/java/org/apache/camel/reactive/SplitParallelTest.java b/components/camel-threadpoolfactory-vertx/src/test/java/org/apache/camel/reactive/SplitParallelTest.java
index 30dacdf..a5b3eef 100644
--- a/components/camel-threadpoolfactory-vertx/src/test/java/org/apache/camel/reactive/SplitParallelTest.java
+++ b/components/camel-threadpoolfactory-vertx/src/test/java/org/apache/camel/reactive/SplitParallelTest.java
@@ -20,9 +20,10 @@ import io.vertx.core.Vertx;
import org.apache.camel.CamelContext;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.reactive.vertx.VertXThreadPoolFactory;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Assert;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
public class SplitParallelTest extends CamelTestSupport {
@@ -61,7 +62,7 @@ public class SplitParallelTest extends CamelTestSupport {
.to("log:bar")
.process(e -> {
String name = Thread.currentThread().getName();
- Assert.assertTrue("Should use vertx thread", name.startsWith("vert.x-worker-thread"));
+ assertTrue(name.startsWith("vert.x-worker-thread"), "Should use vertx thread");
})
.to("mock:split")
.end()