You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2021/01/27 05:50:19 UTC

[camel] 03/08: code refractor

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

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 6d7a4742e366fce32df9d48c3adc2d6f882bd154
Author: aryankoul <ar...@gmail.com>
AuthorDate: Tue Jan 26 23:18:13 2021 +0530

    code refractor
---
 components/camel-azure-storage-datalake/pom.xml    | 29 ++++++++++++++++++++++
 .../docs/azure-storage-datalake-component.adoc     |  9 ++++++-
 ...keConsumerTest.java => DataLakeConsumerIT.java} |  4 +--
 ...ationTest.java => DataLakeFileOperationIT.java} |  2 +-
 ...est.java => DataLakeFileSystemOperationIT.java} |  2 +-
 5 files changed, 41 insertions(+), 5 deletions(-)

diff --git a/components/camel-azure-storage-datalake/pom.xml b/components/camel-azure-storage-datalake/pom.xml
index b4ecd6b..1c5fba3 100644
--- a/components/camel-azure-storage-datalake/pom.xml
+++ b/components/camel-azure-storage-datalake/pom.xml
@@ -106,5 +106,34 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
+    <profiles>
+        <profile>
+            <id>fullTests</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <version>${maven-surefire-plugin-version}</version>
+                        <executions>
+                            <execution>
+                                <phase>integration-test</phase>
+                                <goals>
+                                    <goal>test</goal>
+                                </goals>
+                                <configuration>
+                                    <excludes>
+                                        <exclude>none</exclude>
+                                    </excludes>
+                                    <includes>
+                                        <include>**/*IT</include>
+                                    </includes>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
 </project>
 
diff --git a/components/camel-azure-storage-datalake/src/main/docs/azure-storage-datalake-component.adoc b/components/camel-azure-storage-datalake/src/main/docs/azure-storage-datalake-component.adoc
index e6fcd5e..aafb47d 100644
--- a/components/camel-azure-storage-datalake/src/main/docs/azure-storage-datalake-component.adoc
+++ b/components/camel-azure-storage-datalake/src/main/docs/azure-storage-datalake-component.adoc
@@ -541,6 +541,13 @@ For running all the test in the component, you will need to obtain azure account
 can run the full test, on this component directory, by running the following maven command
 
 ----
-mvn test -Dazure.storage.account.name=accountName -Dazure.storage.account.key=accountKey
+mvn verify -PfullTests -Dazure.storage.account.name=<accountName> -Dazure.storage.account.key=<accessKey>
 ----
 
+You can also skip the integration test, and run only basic unit test by using the command
+
+----
+mvn test
+----
+
+
diff --git a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerTest.java b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerIT.java
similarity index 99%
rename from components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerTest.java
rename to components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerIT.java
index 53bb232..4bd0062 100644
--- a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerTest.java
+++ b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerIT.java
@@ -50,11 +50,11 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
-public class DataLakeConsumerTest extends BaseIT {
+public class DataLakeConsumerIT extends BaseIT {
 
     @TempDir
     static Path testDir;
-    private static final Logger LOG = LoggerFactory.getLogger(DataLakeConsumerTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(DataLakeConsumerIT.class);
 
     @EndpointInject("direct:createFile")
     private ProducerTemplate templateStart;
diff --git a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationTest.java b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationIT.java
similarity index 99%
rename from components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationTest.java
rename to components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationIT.java
index 3cda6eb..5dd7a4f 100644
--- a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationTest.java
+++ b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationIT.java
@@ -45,7 +45,7 @@ import org.junit.jupiter.api.io.TempDir;
 
 import static org.junit.jupiter.api.Assertions.*;
 
-public class DataLakeFileOperationTest extends BaseIT {
+public class DataLakeFileOperationIT extends BaseIT {
     private DataLakeFileSystemClientWrapper fileSystemClientWrapper;
     private String randomFileName;
 
diff --git a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationTest.java b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationIT.java
similarity index 98%
rename from components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationTest.java
rename to components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationIT.java
index 02a32bc..587662d 100644
--- a/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationTest.java
+++ b/components/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileSystemOperationIT.java
@@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
 
 import static org.junit.jupiter.api.Assertions.*;
 
-public class DataLakeFileSystemOperationTest extends BaseIT {
+public class DataLakeFileSystemOperationIT extends BaseIT {
 
     private DataLakeServiceClientWrapper serviceClientWrapper;