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/24 20:52:47 UTC
[camel] 05/27: [CAMEL-11807] Upgrade camel-spark 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 9e8b39707ab670a55d3f4df4aed88283c8db1cc8
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Fri Jul 24 10:28:18 2020 +0200
[CAMEL-11807] Upgrade camel-spark to junit5
---
components/camel-spark/pom.xml | 6 +++---
.../org/apache/camel/component/spark/SparkProducerTest.java | 10 +++++-----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/components/camel-spark/pom.xml b/components/camel-spark/pom.xml
index 467c467..9e8aea1 100644
--- a/components/camel-spark/pom.xml
+++ b/components/camel-spark/pom.xml
@@ -186,12 +186,12 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-test</artifactId>
+ <artifactId>camel-test-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
diff --git a/components/camel-spark/src/test/java/org/apache/camel/component/spark/SparkProducerTest.java b/components/camel-spark/src/test/java/org/apache/camel/component/spark/SparkProducerTest.java
index 6c960d2..6b0ad73 100644
--- a/components/camel-spark/src/test/java/org/apache/camel/component/spark/SparkProducerTest.java
+++ b/components/camel-spark/src/test/java/org/apache/camel/component/spark/SparkProducerTest.java
@@ -23,7 +23,7 @@ import java.util.List;
import org.apache.camel.component.spark.annotations.RddCallback;
import org.apache.camel.spi.Registry;
import org.apache.camel.support.SimpleRegistry;
-import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.camel.test.junit5.CamelTestSupport;
import org.apache.spark.api.java.JavaRDD;
import org.apache.spark.api.java.JavaRDDLike;
import org.apache.spark.api.java.JavaSparkContext;
@@ -31,8 +31,8 @@ import org.apache.spark.sql.Dataset;
import org.apache.spark.sql.Row;
import org.apache.spark.sql.hive.HiveContext;
import org.assertj.core.api.Assertions;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
import static java.lang.Boolean.parseBoolean;
import static java.util.Arrays.asList;
@@ -40,7 +40,7 @@ import static org.apache.camel.component.spark.SparkConstants.SPARK_DATAFRAME_CA
import static org.apache.camel.component.spark.SparkConstants.SPARK_RDD_CALLBACK_HEADER;
import static org.apache.camel.component.spark.Sparks.createLocalSparkContext;
import static org.apache.camel.component.spark.annotations.AnnotatedRddCallback.annotatedRddCallback;
-import static org.junit.Assume.assumeTrue;
+import static org.junit.jupiter.api.Assumptions.assumeTrue;
public class SparkProducerTest extends CamelTestSupport {
@@ -60,7 +60,7 @@ public class SparkProducerTest extends CamelTestSupport {
int numberOfLinesInTestFile = 19;
- @BeforeClass
+ @BeforeAll
public static void beforeClass() {
if (shouldRunHive) {
hiveContext = new HiveContext(sparkContext.sc());