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 2023/08/08 10:12:56 UTC

[camel] branch main updated: (chores) camel-arangodb: added a way to disable ArangoDB tests (#11039)

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

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


The following commit(s) were added to refs/heads/main by this push:
     new f277406da00 (chores) camel-arangodb: added a way to disable ArangoDB tests (#11039)
f277406da00 is described below

commit f277406da00dcf96ed9fd938fba0756366d01783
Author: Otavio Rodolfo Piske <or...@users.noreply.github.com>
AuthorDate: Tue Aug 8 12:12:49 2023 +0200

    (chores) camel-arangodb: added a way to disable ArangoDB tests (#11039)
    
    Some systems may require additional configuration which may not be available. This allows the tests to be skipped in those cases
---
 .../component/arangodb/integration/ArangoCollectionDeleteIT.java | 9 +++++++--
 .../arangodb/integration/ArangoCollectionFindByKeyIT.java        | 9 +++++++--
 .../component/arangodb/integration/ArangoCollectionQueryIT.java  | 9 +++++++--
 .../component/arangodb/integration/ArangoCollectionSaveIT.java   | 9 +++++++--
 .../component/arangodb/integration/ArangoCollectionUpdateIT.java | 9 +++++++--
 .../camel/component/arangodb/integration/ArangoGraphEdgeIT.java  | 9 +++++++--
 .../component/arangodb/integration/ArangoGraphQueriesIT.java     | 9 +++++++--
 .../component/arangodb/integration/ArangoGraphVertexIT.java      | 9 +++++++--
 .../camel/component/arangodb/integration/BaseArangoDb.java       | 4 ++++
 9 files changed, 60 insertions(+), 16 deletions(-)

diff --git a/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoCollectionDeleteIT.java b/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoCollectionDeleteIT.java
index b33ccd82ab7..512e4565d37 100644
--- a/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoCollectionDeleteIT.java
+++ b/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoCollectionDeleteIT.java
@@ -21,6 +21,7 @@ import java.util.Arrays;
 import com.arangodb.entity.BaseDocument;
 import org.apache.camel.builder.RouteBuilder;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledIfSystemProperties;
 import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
 
 import static org.apache.camel.component.arangodb.ArangoDbConstants.MULTI_DELETE;
@@ -28,8 +29,12 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertNull;
 
-@DisabledIfSystemProperty(named = "ci.env.name", matches = "apache.org",
-                          disabledReason = "Apache CI nodes are too resource constrained for this test")
+@DisabledIfSystemProperties({
+        @DisabledIfSystemProperty(named = "ci.env.name", matches = "apache.org",
+                                  disabledReason = "Apache CI nodes are too resource constrained for this test"),
+        @DisabledIfSystemProperty(named = "arangodb.tests.disable", matches = "true",
+                                  disabledReason = "Manually disabled tests")
+})
 public class ArangoCollectionDeleteIT extends BaseArangoDb {
 
     @Override
diff --git a/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoCollectionFindByKeyIT.java b/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoCollectionFindByKeyIT.java
index 51357f41b23..1b206e9c619 100644
--- a/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoCollectionFindByKeyIT.java
+++ b/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoCollectionFindByKeyIT.java
@@ -25,6 +25,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.test.infra.core.annotations.ContextFixture;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledIfSystemProperties;
 import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
 
 import static org.apache.camel.component.arangodb.ArangoDbConstants.RESULT_CLASS_TYPE;
@@ -32,8 +33,12 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
-@DisabledIfSystemProperty(named = "ci.env.name", matches = "apache.org",
-                          disabledReason = "Apache CI nodes are too resource constrained for this test")
+@DisabledIfSystemProperties({
+        @DisabledIfSystemProperty(named = "ci.env.name", matches = "apache.org",
+                                  disabledReason = "Apache CI nodes are too resource constrained for this test"),
+        @DisabledIfSystemProperty(named = "arangodb.tests.disable", matches = "true",
+                                  disabledReason = "Manually disabled tests")
+})
 public class ArangoCollectionFindByKeyIT extends BaseArangoDb {
 
     private BaseDocument myObject;
diff --git a/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoCollectionQueryIT.java b/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoCollectionQueryIT.java
index e7405c352ef..1afb4821c03 100644
--- a/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoCollectionQueryIT.java
+++ b/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoCollectionQueryIT.java
@@ -23,6 +23,7 @@ import java.util.Optional;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledIfSystemProperties;
 import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
 
 import static org.apache.camel.component.arangodb.ArangoDbConstants.AQL_QUERY;
@@ -32,8 +33,12 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
-@DisabledIfSystemProperty(named = "ci.env.name", matches = "apache.org",
-                          disabledReason = "Apache CI nodes are too resource constrained for this test")
+@DisabledIfSystemProperties({
+        @DisabledIfSystemProperty(named = "ci.env.name", matches = "apache.org",
+                                  disabledReason = "Apache CI nodes are too resource constrained for this test"),
+        @DisabledIfSystemProperty(named = "arangodb.tests.disable", matches = "true",
+                                  disabledReason = "Manually disabled tests")
+})
 public class ArangoCollectionQueryIT extends BaseArangoDb {
 
     @Override
diff --git a/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoCollectionSaveIT.java b/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoCollectionSaveIT.java
index 6ced14411fc..f5767fdd196 100644
--- a/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoCollectionSaveIT.java
+++ b/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoCollectionSaveIT.java
@@ -27,6 +27,7 @@ import com.arangodb.entity.MultiDocumentEntity;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledIfSystemProperties;
 import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
 
 import static org.apache.camel.component.arangodb.ArangoDbConstants.MULTI_INSERT;
@@ -34,8 +35,12 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
-@DisabledIfSystemProperty(named = "ci.env.name", matches = "apache.org",
-                          disabledReason = "Apache CI nodes are too resource constrained for this test")
+@DisabledIfSystemProperties({
+        @DisabledIfSystemProperty(named = "ci.env.name", matches = "apache.org",
+                                  disabledReason = "Apache CI nodes are too resource constrained for this test"),
+        @DisabledIfSystemProperty(named = "arangodb.tests.disable", matches = "true",
+                                  disabledReason = "Manually disabled tests")
+})
 public class ArangoCollectionSaveIT extends BaseArangoDb {
 
     @Override
diff --git a/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoCollectionUpdateIT.java b/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoCollectionUpdateIT.java
index 5d08254a22c..bd78ec77b83 100644
--- a/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoCollectionUpdateIT.java
+++ b/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoCollectionUpdateIT.java
@@ -21,13 +21,18 @@ import com.arangodb.entity.DocumentUpdateEntity;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledIfSystemProperties;
 import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
 
 import static org.apache.camel.component.arangodb.ArangoDbConstants.ARANGO_KEY;
 import static org.junit.jupiter.api.Assertions.*;
 
-@DisabledIfSystemProperty(named = "ci.env.name", matches = "apache.org",
-                          disabledReason = "Apache CI nodes are too resource constrained for this test")
+@DisabledIfSystemProperties({
+        @DisabledIfSystemProperty(named = "ci.env.name", matches = "apache.org",
+                                  disabledReason = "Apache CI nodes are too resource constrained for this test"),
+        @DisabledIfSystemProperty(named = "arangodb.tests.disable", matches = "true",
+                                  disabledReason = "Manually disabled tests")
+})
 public class ArangoCollectionUpdateIT extends BaseArangoDb {
 
     @Override
diff --git a/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoGraphEdgeIT.java b/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoGraphEdgeIT.java
index f88274bcc22..57ebc28cc6b 100644
--- a/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoGraphEdgeIT.java
+++ b/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoGraphEdgeIT.java
@@ -23,6 +23,7 @@ import com.arangodb.entity.EdgeUpdateEntity;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledIfSystemProperties;
 import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
 
 import static org.apache.camel.component.arangodb.ArangoDbConstants.ARANGO_KEY;
@@ -31,8 +32,12 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
-@DisabledIfSystemProperty(named = "ci.env.name", matches = "apache.org",
-                          disabledReason = "Apache CI nodes are too resource constrained for this test")
+@DisabledIfSystemProperties({
+        @DisabledIfSystemProperty(named = "ci.env.name", matches = "apache.org",
+                                  disabledReason = "Apache CI nodes are too resource constrained for this test"),
+        @DisabledIfSystemProperty(named = "arangodb.tests.disable", matches = "true",
+                                  disabledReason = "Manually disabled tests")
+})
 public class ArangoGraphEdgeIT extends BaseGraph {
 
     @Override
diff --git a/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoGraphQueriesIT.java b/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoGraphQueriesIT.java
index efd1229d565..4376bda7fe7 100644
--- a/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoGraphQueriesIT.java
+++ b/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoGraphQueriesIT.java
@@ -22,6 +22,7 @@ import com.arangodb.ArangoDBException;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledIfSystemProperties;
 import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
 
 import static org.apache.camel.component.arangodb.ArangoDbConstants.AQL_QUERY;
@@ -31,8 +32,12 @@ import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
-@DisabledIfSystemProperty(named = "ci.env.name", matches = "apache.org",
-                          disabledReason = "Apache CI nodes are too resource constrained for this test")
+@DisabledIfSystemProperties({
+        @DisabledIfSystemProperty(named = "ci.env.name", matches = "apache.org",
+                                  disabledReason = "Apache CI nodes are too resource constrained for this test"),
+        @DisabledIfSystemProperty(named = "arangodb.tests.disable", matches = "true",
+                                  disabledReason = "Manually disabled tests")
+})
 public class ArangoGraphQueriesIT extends BaseGraph {
     @Override
     protected RouteBuilder createRouteBuilder() {
diff --git a/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoGraphVertexIT.java b/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoGraphVertexIT.java
index 1863911c9cc..95932730149 100644
--- a/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoGraphVertexIT.java
+++ b/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/ArangoGraphVertexIT.java
@@ -22,6 +22,7 @@ import com.arangodb.entity.VertexUpdateEntity;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledIfSystemProperties;
 import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
 
 import static org.apache.camel.component.arangodb.ArangoDbConstants.ARANGO_KEY;
@@ -30,8 +31,12 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
-@DisabledIfSystemProperty(named = "ci.env.name", matches = "apache.org",
-                          disabledReason = "Apache CI nodes are too resource constrained for this test")
+@DisabledIfSystemProperties({
+        @DisabledIfSystemProperty(named = "ci.env.name", matches = "apache.org",
+                                  disabledReason = "Apache CI nodes are too resource constrained for this test"),
+        @DisabledIfSystemProperty(named = "arangodb.tests.disable", matches = "true",
+                                  disabledReason = "Manually disabled tests")
+})
 public class ArangoGraphVertexIT extends BaseGraph {
 
     @Override
diff --git a/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/BaseArangoDb.java b/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/BaseArangoDb.java
index 074c3be99ca..b9f04bd9921 100644
--- a/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/BaseArangoDb.java
+++ b/components/camel-arangodb/src/test/java/org/apache/camel/component/arangodb/integration/BaseArangoDb.java
@@ -34,6 +34,10 @@ import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Order;
 import org.junit.jupiter.api.extension.RegisterExtension;
 
+/*
+ * Note: the ArangoDB container requires a higher limit of open files than usually configured
+ * by default (1024). If they start failing on CI systems, this is likely the reason.
+ */
 public abstract class BaseArangoDb implements ConfigurableRoute, CamelTestSupportHelper {
 
     @Order(1)