[camel] branch CAMEL-11807 updated (1f3c29a -> 21c8a84)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[camel] branch CAMEL-11807 updated (1f3c29a -> 21c8a84)

aldettinger
This is an automated email from the ASF dual-hosted git repository.

aldettinger pushed a change to branch CAMEL-11807
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 1f3c29a  Bumped to maven-surefire-plugin 3.0.0-SNAPSHOT
     new 651c2d2  CAMEL-11807: Migrated camel-swagger-java tests to JUnit 5
     new 21c8a84  CAMEL-11807: Experimental bumped to maven-surefire-plugin 3.0.0-M4 staging

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 components/camel-swagger-java/pom.xml                  |  8 +-------
 .../apache/camel/swagger/RestSwaggerArrayEnumTest.java |  2 +-
 .../swagger/RestSwaggerReaderApiDocsOverrideTest.java  | 14 +++++++++++---
 .../camel/swagger/RestSwaggerReaderApiDocsTest.java    | 15 ++++++++++++---
 .../camel/swagger/RestSwaggerReaderDayOfWeekTest.java  | 13 ++++++++++---
 .../RestSwaggerReaderEnableVendorExtensionTest.java    | 14 +++++++++++---
 .../swagger/RestSwaggerReaderModelApiSecurityTest.java | 14 +++++++++++---
 .../swagger/RestSwaggerReaderModelBookOrderTest.java   | 13 ++++++++++---
 .../camel/swagger/RestSwaggerReaderModelTest.java      | 14 +++++++++++---
 .../RestSwaggerReaderOverrideHostApiDocsTest.java      | 12 ++++++++++--
 .../RestSwaggerReaderPropertyPlaceholderTest.java      | 18 +++++++++++++-----
 .../apache/camel/swagger/RestSwaggerReaderTest.java    | 13 ++++++++++---
 .../apache/camel/swagger/RestSwaggerSupportTest.java   |  3 +--
 .../SpringRestSwaggerReaderModelApiSecurityTest.java   | 14 +++++++++++---
 .../camel/swagger/SwaggerRestProducerFactoryTest.java  |  2 +-
 .../camel/swagger/producer/RestSwaggerGetTest.java     |  4 ++--
 .../swagger/producer/RestSwaggerGetUriParamTest.java   |  4 ++--
 parent/pom.xml                                         |  2 +-
 pom.xml                                                | 12 +++++++++++-
 19 files changed, 140 insertions(+), 51 deletions(-)

Reply | Threaded
Open this post in threaded view
|

[camel] 01/02: CAMEL-11807: Migrated camel-swagger-java tests to JUnit 5

aldettinger
This is an automated email from the ASF dual-hosted git repository.

aldettinger pushed a commit to branch CAMEL-11807
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 651c2d277044b285272e60f28fad910b77b1c26f
Author: aldettinger <[hidden email]>
AuthorDate: Wed Nov 13 17:03:03 2019 +0100

    CAMEL-11807: Migrated camel-swagger-java tests to JUnit 5
---
 components/camel-swagger-java/pom.xml                  |  8 +-------
 .../apache/camel/swagger/RestSwaggerArrayEnumTest.java |  2 +-
 .../swagger/RestSwaggerReaderApiDocsOverrideTest.java  | 14 +++++++++++---
 .../camel/swagger/RestSwaggerReaderApiDocsTest.java    | 15 ++++++++++++---
 .../camel/swagger/RestSwaggerReaderDayOfWeekTest.java  | 13 ++++++++++---
 .../RestSwaggerReaderEnableVendorExtensionTest.java    | 14 +++++++++++---
 .../swagger/RestSwaggerReaderModelApiSecurityTest.java | 14 +++++++++++---
 .../swagger/RestSwaggerReaderModelBookOrderTest.java   | 13 ++++++++++---
 .../camel/swagger/RestSwaggerReaderModelTest.java      | 14 +++++++++++---
 .../RestSwaggerReaderOverrideHostApiDocsTest.java      | 12 ++++++++++--
 .../RestSwaggerReaderPropertyPlaceholderTest.java      | 18 +++++++++++++-----
 .../apache/camel/swagger/RestSwaggerReaderTest.java    | 13 ++++++++++---
 .../apache/camel/swagger/RestSwaggerSupportTest.java   |  3 +--
 .../SpringRestSwaggerReaderModelApiSecurityTest.java   | 14 +++++++++++---
 .../camel/swagger/SwaggerRestProducerFactoryTest.java  |  2 +-
 .../camel/swagger/producer/RestSwaggerGetTest.java     |  4 ++--
 .../swagger/producer/RestSwaggerGetUriParamTest.java   |  4 ++--
 17 files changed, 128 insertions(+), 49 deletions(-)

diff --git a/components/camel-swagger-java/pom.xml b/components/camel-swagger-java/pom.xml
index 931f556..332be6c 100644
--- a/components/camel-swagger-java/pom.xml
+++ b/components/camel-swagger-java/pom.xml
@@ -131,7 +131,7 @@
         <!-- testing -->
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test-spring</artifactId>
+            <artifactId>camel-test-spring-junit5</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -153,12 +153,6 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.junit.vintage</groupId>
-            <artifactId>junit-vintage-engine</artifactId>
-            <version>${junit-jupiter-version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
             <groupId>org.apache.logging.log4j</groupId>
             <artifactId>log4j-api</artifactId>
             <scope>test</scope>
diff --git a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerArrayEnumTest.java b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerArrayEnumTest.java
index 13e5266..18477ae 100644
--- a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerArrayEnumTest.java
+++ b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerArrayEnumTest.java
@@ -29,7 +29,7 @@ import io.swagger.models.parameters.Parameter;
 import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.model.rest.RestDefinition;
 import org.apache.camel.model.rest.RestParamType;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 import static org.assertj.core.api.Assertions.assertThat;
 
diff --git a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderApiDocsOverrideTest.java b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderApiDocsOverrideTest.java
index e044b29..5724274 100644
--- a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderApiDocsOverrideTest.java
+++ b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderApiDocsOverrideTest.java
@@ -26,11 +26,19 @@ import org.apache.camel.BindToRegistry;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.model.rest.RestParamType;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class RestSwaggerReaderApiDocsOverrideTest extends CamelTestSupport {
 
+    private static final Logger LOG = LoggerFactory.getLogger(RestSwaggerReaderApiDocsOverrideTest.class);
+
     @BindToRegistry("dummy-rest")
     private DummyRestConsumerFactory factory = new DummyRestConsumerFactory();
 
@@ -64,7 +72,7 @@ public class RestSwaggerReaderApiDocsOverrideTest extends CamelTestSupport {
         mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
         String json = mapper.writeValueAsString(swagger);
 
-        log.info(json);
+        LOG.info(json);
 
         assertFalse(json.contains("\"/hello/bye\""));
         assertFalse(json.contains("\"summary\" : \"To update the greeting message\""));
diff --git a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderApiDocsTest.java b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderApiDocsTest.java
index 73bfc82..7676be4 100644
--- a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderApiDocsTest.java
+++ b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderApiDocsTest.java
@@ -26,11 +26,19 @@ import org.apache.camel.BindToRegistry;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.model.rest.RestParamType;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class RestSwaggerReaderApiDocsTest extends CamelTestSupport {
 
+    private static final Logger LOG = LoggerFactory.getLogger(RestSwaggerReaderApiDocsTest.class);
+
     @BindToRegistry("dummy-rest")
     private DummyRestConsumerFactory factory = new DummyRestConsumerFactory();
 
@@ -50,6 +58,7 @@ public class RestSwaggerReaderApiDocsTest extends CamelTestSupport {
 
     @Test
     public void testReaderRead() throws Exception {
+
         BeanConfig config = new BeanConfig();
         config.setHost("localhost:8080");
         config.setSchemes(new String[] {"http"});
@@ -64,7 +73,7 @@ public class RestSwaggerReaderApiDocsTest extends CamelTestSupport {
         mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
         String json = mapper.writeValueAsString(swagger);
 
-        log.info(json);
+        LOG.info(json);
 
         assertTrue(json.contains("\"host\" : \"localhost:8080\""));
         assertTrue(json.contains("\"basePath\" : \"/api\""));
diff --git a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderDayOfWeekTest.java b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderDayOfWeekTest.java
index 83ef33c..ca2e273 100644
--- a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderDayOfWeekTest.java
+++ b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderDayOfWeekTest.java
@@ -26,11 +26,18 @@ import org.apache.camel.BindToRegistry;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.model.rest.RestParamType;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class RestSwaggerReaderDayOfWeekTest extends CamelTestSupport {
 
+    private static final Logger LOG = LoggerFactory.getLogger(RestSwaggerReaderDayOfWeekTest.class);
+
     @BindToRegistry("dummy-rest")
     private DummyRestConsumerFactory factory = new DummyRestConsumerFactory();
 
@@ -69,7 +76,7 @@ public class RestSwaggerReaderDayOfWeekTest extends CamelTestSupport {
         mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
         String json = mapper.writeValueAsString(swagger);
 
-        log.info(json);
+        LOG.info(json);
 
         assertTrue(json.contains("\"host\" : \"localhost:8080\""));
         assertTrue(json.contains("\"default\" : \"friday\""));
diff --git a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderEnableVendorExtensionTest.java b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderEnableVendorExtensionTest.java
index c4fa429..d4bdac5 100644
--- a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderEnableVendorExtensionTest.java
+++ b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderEnableVendorExtensionTest.java
@@ -26,11 +26,19 @@ import org.apache.camel.BindToRegistry;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.model.rest.RestParamType;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class RestSwaggerReaderEnableVendorExtensionTest extends CamelTestSupport {
 
+    private static final Logger LOG = LoggerFactory.getLogger(RestSwaggerReaderEnableVendorExtensionTest.class);
+
     @BindToRegistry("dummy-rest")
     private DummyRestConsumerFactory factory = new DummyRestConsumerFactory();
 
@@ -76,7 +84,7 @@ public class RestSwaggerReaderEnableVendorExtensionTest extends CamelTestSupport
         mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
         String json = mapper.writeValueAsString(swagger);
 
-        log.info(json);
+        LOG.info(json);
 
         String camelId = context.getName();
         String routeId = context.getRouteDefinitions().get(0).getId();
diff --git a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderModelApiSecurityTest.java b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderModelApiSecurityTest.java
index 8374fda..112f6468 100644
--- a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderModelApiSecurityTest.java
+++ b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderModelApiSecurityTest.java
@@ -26,11 +26,19 @@ import org.apache.camel.BindToRegistry;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.model.rest.RestParamType;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class RestSwaggerReaderModelApiSecurityTest extends CamelTestSupport {
 
+    private static final Logger LOG = LoggerFactory.getLogger(RestSwaggerReaderModelApiSecurityTest.class);
+
     @BindToRegistry("dummy-rest")
     private DummyRestConsumerFactory factory = new DummyRestConsumerFactory();
 
@@ -79,7 +87,7 @@ public class RestSwaggerReaderModelApiSecurityTest extends CamelTestSupport {
         mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
         String json = mapper.writeValueAsString(swagger);
 
-        log.info(json);
+        LOG.info(json);
 
         assertTrue(json.contains("\"securityDefinitions\" : {"));
         assertTrue(json.contains("\"type\" : \"oauth2\","));
diff --git a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderModelBookOrderTest.java b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderModelBookOrderTest.java
index 8961b7c..ca35588 100644
--- a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderModelBookOrderTest.java
+++ b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderModelBookOrderTest.java
@@ -26,11 +26,18 @@ import org.apache.camel.BindToRegistry;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.model.rest.RestParamType;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class RestSwaggerReaderModelBookOrderTest extends CamelTestSupport {
 
+    private static final Logger LOG = LoggerFactory.getLogger(RestSwaggerReaderModelBookOrderTest.class);
+
     @BindToRegistry("dummy-rest")
     private DummyRestConsumerFactory factory = new DummyRestConsumerFactory();
 
@@ -68,7 +75,7 @@ public class RestSwaggerReaderModelBookOrderTest extends CamelTestSupport {
         mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
         String json = mapper.writeValueAsString(swagger);
 
-        log.info(json);
+        LOG.info(json);
 
         assertTrue(json.contains("\"host\" : \"localhost:8080\""));
         assertTrue(json.contains("\"description\" : \"The order returned\""));
diff --git a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderModelTest.java b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderModelTest.java
index 89ff690..a849a8a 100644
--- a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderModelTest.java
+++ b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderModelTest.java
@@ -26,11 +26,19 @@ import org.apache.camel.BindToRegistry;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.model.rest.RestParamType;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class RestSwaggerReaderModelTest extends CamelTestSupport {
 
+    private static final Logger LOG = LoggerFactory.getLogger(RestSwaggerReaderModelTest.class);
+
     @BindToRegistry("dummy-rest")
     private DummyRestConsumerFactory factory = new DummyRestConsumerFactory();
 
@@ -74,7 +82,7 @@ public class RestSwaggerReaderModelTest extends CamelTestSupport {
         mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
         String json = mapper.writeValueAsString(swagger);
 
-        log.info(json);
+        LOG.info(json);
 
         assertTrue(json.contains("\"host\" : \"localhost:8080\""));
         assertTrue(json.contains("\"description\" : \"The user returned\""));
diff --git a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderOverrideHostApiDocsTest.java b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderOverrideHostApiDocsTest.java
index 9475517..bc885d7 100644
--- a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderOverrideHostApiDocsTest.java
+++ b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderOverrideHostApiDocsTest.java
@@ -22,10 +22,18 @@ import com.fasterxml.jackson.databind.SerializationFeature;
 import io.swagger.jaxrs.config.BeanConfig;
 import io.swagger.models.Swagger;
 import org.apache.camel.impl.engine.DefaultClassResolver;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class RestSwaggerReaderOverrideHostApiDocsTest extends RestSwaggerReaderApiDocsTest {
 
+    private static final Logger LOG = LoggerFactory.getLogger(RestSwaggerReaderOverrideHostApiDocsTest.class);
+
     @Override
     @Test
     public void testReaderRead() throws Exception {
@@ -44,7 +52,7 @@ public class RestSwaggerReaderOverrideHostApiDocsTest extends RestSwaggerReaderA
         mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
         String json = mapper.writeValueAsString(swagger);
 
-        log.info(json);
+        LOG.info(json);
 
         assertTrue(json.contains("\"host\" : \"http:mycoolserver:8888/myapi\""));
         assertTrue(json.contains("\"basePath\" : \"/api\""));
diff --git a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderPropertyPlaceholderTest.java b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderPropertyPlaceholderTest.java
index 966e88a..1dba118 100644
--- a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderPropertyPlaceholderTest.java
+++ b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderPropertyPlaceholderTest.java
@@ -31,13 +31,21 @@ import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.model.rest.RestDefinition;
 import org.apache.camel.model.rest.RestParamType;
 import org.apache.camel.swagger.producer.DummyRestProducerFactory;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
-@Ignore("Does not run well on CI due test uses JMX mbeans")
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+@Disabled("Does not run well on CI due test uses JMX mbeans")
 public class RestSwaggerReaderPropertyPlaceholderTest extends CamelTestSupport {
 
+    private static final Logger LOG = LoggerFactory.getLogger(RestSwaggerReaderPropertyPlaceholderTest.class);
+
     @BindToRegistry("dummy-rest")
     private DummyRestProducerFactory factory = new DummyRestProducerFactory();
 
@@ -87,7 +95,7 @@ public class RestSwaggerReaderPropertyPlaceholderTest extends CamelTestSupport {
         mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
         String json = mapper.writeValueAsString(swagger);
 
-        log.info(json);
+        LOG.info(json);
 
         assertTrue(json.contains("\"host\" : \"localhost:8080\""));
         assertTrue(json.contains("\"basePath\" : \"/api\""));
diff --git a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderTest.java b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderTest.java
index add70e6..253b6a6 100644
--- a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderTest.java
+++ b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerReaderTest.java
@@ -26,11 +26,18 @@ import org.apache.camel.BindToRegistry;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.model.rest.RestParamType;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class RestSwaggerReaderTest extends CamelTestSupport {
 
+    private static final Logger LOG = LoggerFactory.getLogger(RestSwaggerReaderTest.class);
+
     @BindToRegistry("dummy-rest")
     private DummyRestConsumerFactory factory = new DummyRestConsumerFactory();
 
@@ -65,7 +72,7 @@ public class RestSwaggerReaderTest extends CamelTestSupport {
         mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
         String json = mapper.writeValueAsString(swagger);
 
-        log.info(json);
+        LOG.info(json);
 
         assertTrue(json.contains("\"host\" : \"localhost:8080\""));
         assertTrue(json.contains("\"basePath\" : \"/api\""));
diff --git a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerSupportTest.java b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerSupportTest.java
index efbdf82..72927f6 100644
--- a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerSupportTest.java
+++ b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/RestSwaggerSupportTest.java
@@ -33,7 +33,6 @@ import static org.junit.jupiter.params.provider.Arguments.arguments;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.verifyNoMoreInteractions;
-import static org.mockito.Mockito.verifyZeroInteractions;
 
 public class RestSwaggerSupportTest {
 
@@ -91,7 +90,7 @@ public class RestSwaggerSupportTest {
 
         RestSwaggerSupport.setupXForwardedHeaders(swagger, Collections.emptyMap());
 
-        verifyZeroInteractions(swagger);
+        verifyNoMoreInteractions(swagger);
     }
 
     static Stream<Arguments> basePathAndPrefixVariations() {
diff --git a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/SpringRestSwaggerReaderModelApiSecurityTest.java b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/SpringRestSwaggerReaderModelApiSecurityTest.java
index 27f9841..7134593 100644
--- a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/SpringRestSwaggerReaderModelApiSecurityTest.java
+++ b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/SpringRestSwaggerReaderModelApiSecurityTest.java
@@ -22,13 +22,21 @@ import com.fasterxml.jackson.databind.SerializationFeature;
 import io.swagger.jaxrs.config.BeanConfig;
 import io.swagger.models.Swagger;
 import org.apache.camel.impl.engine.DefaultClassResolver;
-import org.apache.camel.test.spring.CamelSpringTestSupport;
-import org.junit.Test;
+import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
+import org.junit.jupiter.api.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 public class SpringRestSwaggerReaderModelApiSecurityTest extends CamelSpringTestSupport {
 
+    private static final Logger LOG = LoggerFactory.getLogger(SpringRestSwaggerReaderModelApiSecurityTest.class);
+
     @Override
     protected AbstractApplicationContext createApplicationContext() {
         return new ClassPathXmlApplicationContext("org/apache/camel/swagger/SpringRestSwaggerReaderModelApiSecurityTest.xml");
@@ -53,7 +61,7 @@ public class SpringRestSwaggerReaderModelApiSecurityTest extends CamelSpringTest
         mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
         String json = mapper.writeValueAsString(swagger);
 
-        log.info(json);
+        LOG.info(json);
 
         assertTrue(json.contains("\"securityDefinitions\" : {"));
         assertTrue(json.contains("\"type\" : \"oauth2\","));
diff --git a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/SwaggerRestProducerFactoryTest.java b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/SwaggerRestProducerFactoryTest.java
index a84889b..1d76488 100644
--- a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/SwaggerRestProducerFactoryTest.java
+++ b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/SwaggerRestProducerFactoryTest.java
@@ -17,7 +17,7 @@
 package org.apache.camel.swagger;
 
 import org.apache.camel.impl.DefaultCamelContext;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class SwaggerRestProducerFactoryTest {
 
diff --git a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/producer/RestSwaggerGetTest.java b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/producer/RestSwaggerGetTest.java
index f28f260..b0ab3bb 100644
--- a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/producer/RestSwaggerGetTest.java
+++ b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/producer/RestSwaggerGetTest.java
@@ -19,8 +19,8 @@ package org.apache.camel.swagger.producer;
 import org.apache.camel.BindToRegistry;
 import org.apache.camel.RoutesBuilder;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
 
 public class RestSwaggerGetTest extends CamelTestSupport {
 
diff --git a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/producer/RestSwaggerGetUriParamTest.java b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/producer/RestSwaggerGetUriParamTest.java
index 2f625ee..beed34c 100644
--- a/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/producer/RestSwaggerGetUriParamTest.java
+++ b/components/camel-swagger-java/src/test/java/org/apache/camel/swagger/producer/RestSwaggerGetUriParamTest.java
@@ -19,8 +19,8 @@ package org.apache.camel.swagger.producer;
 import org.apache.camel.BindToRegistry;
 import org.apache.camel.RoutesBuilder;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
 
 public class RestSwaggerGetUriParamTest extends CamelTestSupport {
 

Reply | Threaded
Open this post in threaded view
|

[camel] 02/02: CAMEL-11807: Experimental bumped to maven-surefire-plugin 3.0.0-M4 staging

aldettinger
In reply to this post by aldettinger
This is an automated email from the ASF dual-hosted git repository.

aldettinger pushed a commit to branch CAMEL-11807
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 21c8a8495c496c36a1144612c0b77f8deb18894e
Author: aldettinger <[hidden email]>
AuthorDate: Wed Nov 13 17:04:37 2019 +0100

    CAMEL-11807: Experimental bumped to maven-surefire-plugin 3.0.0-M4 staging
---
 parent/pom.xml |  2 +-
 pom.xml        | 12 +++++++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/parent/pom.xml b/parent/pom.xml
index 617a749..99547ec 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -449,7 +449,7 @@
         <maven-reporting-api-version>2.2.1</maven-reporting-api-version>
         <maven-reporting-impl-version>2.0.5</maven-reporting-impl-version>
         <maven-shade-plugin-version>3.2.1</maven-shade-plugin-version>
-        <maven-surefire-report-plugin-version>3.0.0-SNAPSHOT</maven-surefire-report-plugin-version>
+        <maven-surefire-report-plugin-version>3.0.0-M4</maven-surefire-report-plugin-version>
         <maven-war-plugin-version>3.2.3</maven-war-plugin-version>
         <metrics-version>3.2.6</metrics-version>
         <micrometer-version>1.2.2</micrometer-version>
diff --git a/pom.xml b/pom.xml
index 479cd0c..bb24879 100644
--- a/pom.xml
+++ b/pom.xml
@@ -117,7 +117,7 @@
 
         <maven-compiler-plugin-version>3.8.1</maven-compiler-plugin-version>
         <maven-javadoc-plugin-version>3.0.1</maven-javadoc-plugin-version>
-        <maven-surefire-plugin-version>3.0.0-SNAPSHOT</maven-surefire-plugin-version>
+        <maven-surefire-plugin-version>3.0.0-M4</maven-surefire-plugin-version>
         <!-- we need to override the version inherited from Apache POM for modules that use this POM as parent -->
         <surefire.version>${maven-surefire-plugin-version}</surefire.version>
 
@@ -146,6 +146,16 @@
     </repositories>
     <pluginRepositories>
         <pluginRepository>
+            <id>surefire-M4-stating</id>
+            <url>https://repository.apache.org/content/repositories/maven-1538/</url>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+        </pluginRepository>
+        <pluginRepository>
             <id>apache.snapshots</id>
             <url>https://repository.apache.org/snapshots/</url>
             <snapshots>