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/12/06 18:21:55 UTC

(camel) branch main updated: CAMEL-20194: move the properties files to a separate dir

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 9cdcbceb86d CAMEL-20194: move the properties files to a separate dir
9cdcbceb86d is described below

commit 9cdcbceb86d7b31ffce9ffbae072f3096a6e1529
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Wed Dec 6 13:51:36 2023 -0300

    CAMEL-20194: move the properties files to a separate dir
    
    This should prevent clashes when running tests with more than one infra component for a single test
---
 .../camel/test/infra/arangodb/services}/container.properties |  0
 .../camel/test/infra/aws2/services}/container.properties     |  0
 .../camel/test/infra/common/services}/container.properties   |  0
 .../test/infra/cassandra/services}/container.properties      |  0
 .../test/infra/chatscript/services}/container.properties     |  0
 .../camel/test/infra/common/LocalPropertyResolver.java       | 12 +++---------
 .../camel/test/infra/consul/services}/container.properties   |  0
 .../test/infra/couchbase/services}/container.properties      |  0
 .../camel/test/infra/couchdb/services}/container.properties  |  0
 .../test/infra/elasticsearch/services}/container.properties  |  0
 .../camel/test/infra/etcd3/services}/container.properties    |  0
 .../camel/test/infra/fhir/services}/container.properties     |  0
 .../test/infra/google/pubsub/services}/container.properties  |  0
 .../infra/hashicorp/vault/services}/container.properties     |  0
 .../test/infra/infinispan/services}/container.properties     |  0
 .../camel/test/infra/kafka/services}/container.properties    |  0
 .../infra/microprofile/lra/services}/container.properties    |  0
 .../camel/test/infra/minio/services}/container.properties    |  0
 .../camel/test/infra/mongodb/services}/container.properties  |  0
 .../test/infra/mosquitto/services}/container.properties      |  0
 .../camel/test/infra/nats/services}/container.properties     |  0
 .../camel/test/infra/openldap/services}/container.properties |  0
 .../test/infra/opensearch/services}/container.properties     |  0
 .../camel/test/infra/postgres/services}/container.properties |  0
 .../camel/test/infra/pulsar/services}/container.properties   |  0
 .../camel/test/infra/rabbitmq/services}/container.properties |  0
 .../camel/test/infra/redis/services}/container.properties    |  0
 .../camel/test/infra/rocketmq/services}/container.properties |  0
 .../camel/test/infra/xmpp/services}/container.properties     |  0
 .../test/infra/zookeeper/services}/container.properties      |  0
 30 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/test-infra/camel-test-infra-arangodb/src/test/resources/container.properties b/test-infra/camel-test-infra-arangodb/src/test/resources/org/apache/camel/test/infra/arangodb/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-arangodb/src/test/resources/container.properties
rename to test-infra/camel-test-infra-arangodb/src/test/resources/org/apache/camel/test/infra/arangodb/services/container.properties
diff --git a/test-infra/camel-test-infra-aws-v2/src/test/resources/container.properties b/test-infra/camel-test-infra-aws-v2/src/test/resources/org/apache/camel/test/infra/aws2/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-aws-v2/src/test/resources/container.properties
rename to test-infra/camel-test-infra-aws-v2/src/test/resources/org/apache/camel/test/infra/aws2/services/container.properties
diff --git a/test-infra/camel-test-infra-azure-common/src/test/resources/container.properties b/test-infra/camel-test-infra-azure-common/src/test/resources/org/apache/camel/test/infra/common/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-azure-common/src/test/resources/container.properties
rename to test-infra/camel-test-infra-azure-common/src/test/resources/org/apache/camel/test/infra/common/services/container.properties
diff --git a/test-infra/camel-test-infra-cassandra/src/test/resources/container.properties b/test-infra/camel-test-infra-cassandra/src/test/resources/org/apache/camel/test/infra/cassandra/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-cassandra/src/test/resources/container.properties
rename to test-infra/camel-test-infra-cassandra/src/test/resources/org/apache/camel/test/infra/cassandra/services/container.properties
diff --git a/test-infra/camel-test-infra-chatscript/src/test/resources/container.properties b/test-infra/camel-test-infra-chatscript/src/test/resources/org/apache/camel/test/infra/chatscript/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-chatscript/src/test/resources/container.properties
rename to test-infra/camel-test-infra-chatscript/src/test/resources/org/apache/camel/test/infra/chatscript/services/container.properties
diff --git a/test-infra/camel-test-infra-common/src/test/java/org/apache/camel/test/infra/common/LocalPropertyResolver.java b/test-infra/camel-test-infra-common/src/test/java/org/apache/camel/test/infra/common/LocalPropertyResolver.java
index fe121966419..884a5f478fe 100644
--- a/test-infra/camel-test-infra-common/src/test/java/org/apache/camel/test/infra/common/LocalPropertyResolver.java
+++ b/test-infra/camel-test-infra-common/src/test/java/org/apache/camel/test/infra/common/LocalPropertyResolver.java
@@ -24,20 +24,14 @@ public class LocalPropertyResolver {
 
     public static final String CONTAINER_PROPERTIES_FILE_NAME = "container.properties";
 
-    public static String getProperty(Class clazz, String propertyName) {
+    public static String getProperty(Class<?> clazz, String propertyName) {
         return System.getProperty(propertyName, getPropertyFromContainersPropertiesFile(clazz, propertyName));
     }
 
-    private static String getPropertyFromContainersPropertiesFile(Class clazz, String propertyName) {
-        ClassLoader classLoader = clazz.getClassLoader();
-        if (classLoader == null)
-            throw new RuntimeException(
-                    "Error when trying to read file " + CONTAINER_PROPERTIES_FILE_NAME
-                                       + ": classLoader is null for class " + clazz.getCanonicalName());
-
+    private static String getPropertyFromContainersPropertiesFile(Class<?> clazz, String propertyName) {
         Properties properties = new Properties();
 
-        try (InputStream inputStream = classLoader.getResourceAsStream(CONTAINER_PROPERTIES_FILE_NAME)) {
+        try (InputStream inputStream = clazz.getResourceAsStream(CONTAINER_PROPERTIES_FILE_NAME)) {
             properties.load(inputStream);
         } catch (IOException e) {
             String errorMessage = "Error when reading file " + CONTAINER_PROPERTIES_FILE_NAME
diff --git a/test-infra/camel-test-infra-consul/src/test/resources/container.properties b/test-infra/camel-test-infra-consul/src/test/resources/org/apache/camel/test/infra/consul/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-consul/src/test/resources/container.properties
rename to test-infra/camel-test-infra-consul/src/test/resources/org/apache/camel/test/infra/consul/services/container.properties
diff --git a/test-infra/camel-test-infra-couchbase/src/test/resources/container.properties b/test-infra/camel-test-infra-couchbase/src/test/resources/org/apache/camel/test/infra/couchbase/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-couchbase/src/test/resources/container.properties
rename to test-infra/camel-test-infra-couchbase/src/test/resources/org/apache/camel/test/infra/couchbase/services/container.properties
diff --git a/test-infra/camel-test-infra-couchdb/src/test/resources/container.properties b/test-infra/camel-test-infra-couchdb/src/test/resources/org/apache/camel/test/infra/couchdb/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-couchdb/src/test/resources/container.properties
rename to test-infra/camel-test-infra-couchdb/src/test/resources/org/apache/camel/test/infra/couchdb/services/container.properties
diff --git a/test-infra/camel-test-infra-elasticsearch/src/test/resources/container.properties b/test-infra/camel-test-infra-elasticsearch/src/test/resources/org/apache/camel/test/infra/elasticsearch/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-elasticsearch/src/test/resources/container.properties
rename to test-infra/camel-test-infra-elasticsearch/src/test/resources/org/apache/camel/test/infra/elasticsearch/services/container.properties
diff --git a/test-infra/camel-test-infra-etcd3/src/test/resources/container.properties b/test-infra/camel-test-infra-etcd3/src/test/resources/org/apache/camel/test/infra/etcd3/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-etcd3/src/test/resources/container.properties
rename to test-infra/camel-test-infra-etcd3/src/test/resources/org/apache/camel/test/infra/etcd3/services/container.properties
diff --git a/test-infra/camel-test-infra-fhir/src/test/resources/container.properties b/test-infra/camel-test-infra-fhir/src/test/resources/org/apache/camel/test/infra/fhir/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-fhir/src/test/resources/container.properties
rename to test-infra/camel-test-infra-fhir/src/test/resources/org/apache/camel/test/infra/fhir/services/container.properties
diff --git a/test-infra/camel-test-infra-google-pubsub/src/test/resources/container.properties b/test-infra/camel-test-infra-google-pubsub/src/test/resources/org/apache/camel/test/infra/google/pubsub/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-google-pubsub/src/test/resources/container.properties
rename to test-infra/camel-test-infra-google-pubsub/src/test/resources/org/apache/camel/test/infra/google/pubsub/services/container.properties
diff --git a/test-infra/camel-test-infra-hashicorp-vault/src/test/resources/container.properties b/test-infra/camel-test-infra-hashicorp-vault/src/test/resources/org/apache/camel/test/infra/hashicorp/vault/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-hashicorp-vault/src/test/resources/container.properties
rename to test-infra/camel-test-infra-hashicorp-vault/src/test/resources/org/apache/camel/test/infra/hashicorp/vault/services/container.properties
diff --git a/test-infra/camel-test-infra-infinispan/src/test/resources/container.properties b/test-infra/camel-test-infra-infinispan/src/test/resources/org/apache/camel/test/infra/infinispan/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-infinispan/src/test/resources/container.properties
rename to test-infra/camel-test-infra-infinispan/src/test/resources/org/apache/camel/test/infra/infinispan/services/container.properties
diff --git a/test-infra/camel-test-infra-kafka/src/test/resources/container.properties b/test-infra/camel-test-infra-kafka/src/test/resources/org/apache/camel/test/infra/kafka/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-kafka/src/test/resources/container.properties
rename to test-infra/camel-test-infra-kafka/src/test/resources/org/apache/camel/test/infra/kafka/services/container.properties
diff --git a/test-infra/camel-test-infra-microprofile-lra/src/test/resources/container.properties b/test-infra/camel-test-infra-microprofile-lra/src/test/resources/org/apache/camel/test/infra/microprofile/lra/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-microprofile-lra/src/test/resources/container.properties
rename to test-infra/camel-test-infra-microprofile-lra/src/test/resources/org/apache/camel/test/infra/microprofile/lra/services/container.properties
diff --git a/test-infra/camel-test-infra-minio/src/test/resources/container.properties b/test-infra/camel-test-infra-minio/src/test/resources/org/apache/camel/test/infra/minio/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-minio/src/test/resources/container.properties
rename to test-infra/camel-test-infra-minio/src/test/resources/org/apache/camel/test/infra/minio/services/container.properties
diff --git a/test-infra/camel-test-infra-mongodb/src/test/resources/container.properties b/test-infra/camel-test-infra-mongodb/src/test/resources/org/apache/camel/test/infra/mongodb/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-mongodb/src/test/resources/container.properties
rename to test-infra/camel-test-infra-mongodb/src/test/resources/org/apache/camel/test/infra/mongodb/services/container.properties
diff --git a/test-infra/camel-test-infra-mosquitto/src/test/resources/container.properties b/test-infra/camel-test-infra-mosquitto/src/test/resources/org/apache/camel/test/infra/mosquitto/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-mosquitto/src/test/resources/container.properties
rename to test-infra/camel-test-infra-mosquitto/src/test/resources/org/apache/camel/test/infra/mosquitto/services/container.properties
diff --git a/test-infra/camel-test-infra-nats/src/test/resources/container.properties b/test-infra/camel-test-infra-nats/src/test/resources/org/apache/camel/test/infra/nats/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-nats/src/test/resources/container.properties
rename to test-infra/camel-test-infra-nats/src/test/resources/org/apache/camel/test/infra/nats/services/container.properties
diff --git a/test-infra/camel-test-infra-openldap/src/test/resources/container.properties b/test-infra/camel-test-infra-openldap/src/test/resources/org/apache/camel/test/infra/openldap/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-openldap/src/test/resources/container.properties
rename to test-infra/camel-test-infra-openldap/src/test/resources/org/apache/camel/test/infra/openldap/services/container.properties
diff --git a/test-infra/camel-test-infra-opensearch/src/test/resources/container.properties b/test-infra/camel-test-infra-opensearch/src/test/resources/org/apache/camel/test/infra/opensearch/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-opensearch/src/test/resources/container.properties
rename to test-infra/camel-test-infra-opensearch/src/test/resources/org/apache/camel/test/infra/opensearch/services/container.properties
diff --git a/test-infra/camel-test-infra-postgres/src/test/resources/container.properties b/test-infra/camel-test-infra-postgres/src/test/resources/org/apache/camel/test/infra/postgres/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-postgres/src/test/resources/container.properties
rename to test-infra/camel-test-infra-postgres/src/test/resources/org/apache/camel/test/infra/postgres/services/container.properties
diff --git a/test-infra/camel-test-infra-pulsar/src/test/resources/container.properties b/test-infra/camel-test-infra-pulsar/src/test/resources/org/apache/camel/test/infra/pulsar/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-pulsar/src/test/resources/container.properties
rename to test-infra/camel-test-infra-pulsar/src/test/resources/org/apache/camel/test/infra/pulsar/services/container.properties
diff --git a/test-infra/camel-test-infra-rabbitmq/src/test/resources/container.properties b/test-infra/camel-test-infra-rabbitmq/src/test/resources/org/apache/camel/test/infra/rabbitmq/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-rabbitmq/src/test/resources/container.properties
rename to test-infra/camel-test-infra-rabbitmq/src/test/resources/org/apache/camel/test/infra/rabbitmq/services/container.properties
diff --git a/test-infra/camel-test-infra-redis/src/test/resources/container.properties b/test-infra/camel-test-infra-redis/src/test/resources/org/apache/camel/test/infra/redis/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-redis/src/test/resources/container.properties
rename to test-infra/camel-test-infra-redis/src/test/resources/org/apache/camel/test/infra/redis/services/container.properties
diff --git a/test-infra/camel-test-infra-rocketmq/src/test/resources/container.properties b/test-infra/camel-test-infra-rocketmq/src/test/resources/org/apache/camel/test/infra/rocketmq/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-rocketmq/src/test/resources/container.properties
rename to test-infra/camel-test-infra-rocketmq/src/test/resources/org/apache/camel/test/infra/rocketmq/services/container.properties
diff --git a/test-infra/camel-test-infra-xmpp/src/test/resources/container.properties b/test-infra/camel-test-infra-xmpp/src/test/resources/org/apache/camel/test/infra/xmpp/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-xmpp/src/test/resources/container.properties
rename to test-infra/camel-test-infra-xmpp/src/test/resources/org/apache/camel/test/infra/xmpp/services/container.properties
diff --git a/test-infra/camel-test-infra-zookeeper/src/test/resources/container.properties b/test-infra/camel-test-infra-zookeeper/src/test/resources/org/apache/camel/test/infra/zookeeper/services/container.properties
similarity index 100%
rename from test-infra/camel-test-infra-zookeeper/src/test/resources/container.properties
rename to test-infra/camel-test-infra-zookeeper/src/test/resources/org/apache/camel/test/infra/zookeeper/services/container.properties