You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2020/10/07 15:59:21 UTC

[camel-kafka-connector] branch master updated: Clean up usages of org.junit.Assert

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

orpiske pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-kafka-connector.git


The following commit(s) were added to refs/heads/master by this push:
     new 6a2776c  Clean up usages of org.junit.Assert
6a2776c is described below

commit 6a2776cc8807eadab145a9c59d89523c27c9e9be
Author: Allon Mureinik <al...@synopsys.com>
AuthorDate: Wed Oct 7 18:14:02 2020 +0300

    Clean up usages of org.junit.Assert
    
    The project standard is to use org.junit.jupiter.api.Assertions for
    assertions, but there are several instances where the older
    org.junit.Assert is used, in what seems to be an oversight.
    
    This patch cleans up those usages, and standardizes them to use
    org.junit.jupiter.api.Assertions, like the rest of the project.
---
 .../common/services/kafkaconnect/KafkaConnectRunnerService.java    | 2 +-
 .../apache/camel/kafkaconnector/common/utils/PropertyUtils.java    | 7 ++++---
 .../camel/kafkaconnector/syslog/sink/CamelSinkSyslogITCase.java    | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/tests/itests-common/src/test/java/org/apache/camel/kafkaconnector/common/services/kafkaconnect/KafkaConnectRunnerService.java b/tests/itests-common/src/test/java/org/apache/camel/kafkaconnector/common/services/kafkaconnect/KafkaConnectRunnerService.java
index 6ceaeda..cc83459 100644
--- a/tests/itests-common/src/test/java/org/apache/camel/kafkaconnector/common/services/kafkaconnect/KafkaConnectRunnerService.java
+++ b/tests/itests-common/src/test/java/org/apache/camel/kafkaconnector/common/services/kafkaconnect/KafkaConnectRunnerService.java
@@ -31,7 +31,7 @@ import org.apache.kafka.connect.runtime.ConnectorConfig;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.fail;
 
 public class KafkaConnectRunnerService implements KafkaConnectService {
     private static final Logger LOG = LoggerFactory.getLogger(KafkaConnectRunnerService.class);
diff --git a/tests/itests-common/src/test/java/org/apache/camel/kafkaconnector/common/utils/PropertyUtils.java b/tests/itests-common/src/test/java/org/apache/camel/kafkaconnector/common/utils/PropertyUtils.java
index 18b36c7..9896997 100644
--- a/tests/itests-common/src/test/java/org/apache/camel/kafkaconnector/common/utils/PropertyUtils.java
+++ b/tests/itests-common/src/test/java/org/apache/camel/kafkaconnector/common/utils/PropertyUtils.java
@@ -23,10 +23,11 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.util.Properties;
 
-import org.junit.Assert;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static org.junit.jupiter.api.Assertions.fail;
+
 public final class PropertyUtils {
     private static final Logger LOG = LoggerFactory.getLogger(PropertyUtils.class);
     private static Properties properties = new Properties();
@@ -56,12 +57,12 @@ public final class PropertyUtils {
             LOG.error("Test properties provided at {} does not exist, therefore aborting the test execution",
                     fileName);
 
-            Assert.fail("The given test properties file does not exist");
+            fail("The given test properties file does not exist");
         } catch (IOException e) {
             LOG.error("I/O error reading the test properties at {}: {}",
                     fileName, e.getMessage(), e);
 
-            Assert.fail("Unable to read the test properties file");
+            fail("Unable to read the test properties file");
         }
     }
 }
diff --git a/tests/itests-syslog/src/test/java/org/apache/camel/kafkaconnector/syslog/sink/CamelSinkSyslogITCase.java b/tests/itests-syslog/src/test/java/org/apache/camel/kafkaconnector/syslog/sink/CamelSinkSyslogITCase.java
index a6a1ff5..c4f3acb 100644
--- a/tests/itests-syslog/src/test/java/org/apache/camel/kafkaconnector/syslog/sink/CamelSinkSyslogITCase.java
+++ b/tests/itests-syslog/src/test/java/org/apache/camel/kafkaconnector/syslog/sink/CamelSinkSyslogITCase.java
@@ -30,7 +30,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testcontainers.junit.jupiter.Testcontainers;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.fail;