Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAMEL-17907: Add camel-infinispan-starter test #514

Merged
merged 1 commit into from Apr 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -50,24 +50,24 @@
"resultHeader": { "kind": "property", "displayName": "Result Header", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Store the operation result in a header instead of the message body. By default, resultHeader == null and the query result is stored in the message body, any existing content in the message body is discarded. If resultHeader is set, the value is used as the name of the header to store the query result and the original message body is preserved. This value can be overridden by an in message header named: CamelInfinispanOperationResultHeader" }
},
"headers": {
"CamelInfinispanEventType": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The type of the received event." },
"CamelInfinispanCacheName": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The cache participating in the operation or event." },
"CamelInfinispanKey": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The key to perform the operation to or the key generating the event." },
"CamelInfinispanValue": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The value to use for the operation." },
"CamelInfinispanDefaultValue": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The default value to use for a getOrDefault." },
"CamelInfinispanOldValue": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The old value to use for a replace." },
"CamelInfinispanMap": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Map", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A Map to use in case of CamelInfinispanOperationPutAll operation" },
"CamelInfinispanOperation": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "org.apache.camel.component.infinispan.InfinispanOperation", "enum": [ "PUT", "PUTASYNC", "PUTALL", "PUTALLASYNC", "PUTIFABSENT", "PUTIFABSENTASYNC", "GET", "GETORDEFAULT", "CONTAINSKEY", "CONTAINSVALUE", "REMOVE", "REMOVEASYNC", "REPLACE", "REPLACEASYNC", "SIZE", "CLEAR", "CLEARASYNC", "QUERY", "STATS", "COMPUTE", "COMPUTEASYNC" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform." },
"CamelInfinispanOperationResult": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the header whose value is the result" },
"CamelInfinispanOperationResultHeader": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Store the operation result in a header instead of the message body" },
"CamelInfinispanLifespanTime": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Lifespan time of a value inside the cache. Negative values are interpreted as infinity." },
"CamelInfinispanTimeUnit": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "java.util.concurrent.TimeUnit", "enum": [ "NANOSECONDS", "MICROSECONDS", "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Time Unit of an entry Lifespan Time." },
"CamelInfinispanMaxIdleTime": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The maximum amount of time an entry is allowed to be idle for before it is considered as expired." },
"CamelInfinispanMaxIdleTimeUnit": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "java.util.concurrent.TimeUnit", "enum": [ "NANOSECONDS", "MICROSECONDS", "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Time Unit of an entry Max Idle Time." },
"CamelInfinispanEventData": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The event data." },
"CamelInfinispanQueryBuilder": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "org.apache.camel.component.infinispan.InfinispanQueryBuilder", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The QueryBuilder to use for QUERY command, if not present the command defaults to InifinispanConfiguration's one" },
"CamelInfinispanEntryVersion": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Provides access to the version of the created cache entry." },
"CamelInfinispanCommandRetried": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "This will be true if the write command that caused this had to be retried again due to a topology change." }
"CamelInfinispanEventType": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The type of the received event.", "constantName": "org.apache.camel.component.infinispan.InfinispanConstants#EVENT_TYPE" },
"CamelInfinispanCacheName": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The cache participating in the operation or event.", "constantName": "org.apache.camel.component.infinispan.InfinispanConstants#CACHE_NAME" },
"CamelInfinispanKey": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The key to perform the operation to or the key generating the event.", "constantName": "org.apache.camel.component.infinispan.InfinispanConstants#KEY" },
"CamelInfinispanValue": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The value to use for the operation.", "constantName": "org.apache.camel.component.infinispan.InfinispanConstants#VALUE" },
"CamelInfinispanDefaultValue": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The default value to use for a getOrDefault.", "constantName": "org.apache.camel.component.infinispan.InfinispanConstants#DEFAULT_VALUE" },
"CamelInfinispanOldValue": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The old value to use for a replace.", "constantName": "org.apache.camel.component.infinispan.InfinispanConstants#OLD_VALUE" },
"CamelInfinispanMap": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Map", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A Map to use in case of CamelInfinispanOperationPutAll operation", "constantName": "org.apache.camel.component.infinispan.InfinispanConstants#MAP" },
"CamelInfinispanOperation": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "org.apache.camel.component.infinispan.InfinispanOperation", "enum": [ "PUT", "PUTASYNC", "PUTALL", "PUTALLASYNC", "PUTIFABSENT", "PUTIFABSENTASYNC", "GET", "GETORDEFAULT", "CONTAINSKEY", "CONTAINSVALUE", "REMOVE", "REMOVEASYNC", "REPLACE", "REPLACEASYNC", "SIZE", "CLEAR", "CLEARASYNC", "QUERY", "STATS", "COMPUTE", "COMPUTEASYNC" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform.", "constantName": "org.apache.camel.component.infinispan.InfinispanConstants#OPERATION" },
"CamelInfinispanOperationResult": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the header whose value is the result", "constantName": "org.apache.camel.component.infinispan.InfinispanConstants#RESULT" },
"CamelInfinispanOperationResultHeader": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Store the operation result in a header instead of the message body", "constantName": "org.apache.camel.component.infinispan.InfinispanConstants#RESULT_HEADER" },
"CamelInfinispanLifespanTime": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Lifespan time of a value inside the cache. Negative values are interpreted as infinity.", "constantName": "org.apache.camel.component.infinispan.InfinispanConstants#LIFESPAN_TIME" },
"CamelInfinispanTimeUnit": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "java.util.concurrent.TimeUnit", "enum": [ "NANOSECONDS", "MICROSECONDS", "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Time Unit of an entry Lifespan Time.", "constantName": "org.apache.camel.component.infinispan.InfinispanConstants#LIFESPAN_TIME_UNIT" },
"CamelInfinispanMaxIdleTime": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The maximum amount of time an entry is allowed to be idle for before it is considered as expired.", "constantName": "org.apache.camel.component.infinispan.InfinispanConstants#MAX_IDLE_TIME" },
"CamelInfinispanMaxIdleTimeUnit": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "java.util.concurrent.TimeUnit", "enum": [ "NANOSECONDS", "MICROSECONDS", "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Time Unit of an entry Max Idle Time.", "constantName": "org.apache.camel.component.infinispan.InfinispanConstants#MAX_IDLE_TIME_UNIT" },
"CamelInfinispanEventData": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The event data.", "constantName": "org.apache.camel.component.infinispan.InfinispanConstants#EVENT_DATA" },
"CamelInfinispanQueryBuilder": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "org.apache.camel.component.infinispan.InfinispanQueryBuilder", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The QueryBuilder to use for QUERY command, if not present the command defaults to InifinispanConfiguration's one", "constantName": "org.apache.camel.component.infinispan.InfinispanConstants#QUERY_BUILDER" },
"CamelInfinispanEntryVersion": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Provides access to the version of the created cache entry.", "constantName": "org.apache.camel.component.infinispan.InfinispanConstants#ENTRY_VERSION" },
"CamelInfinispanCommandRetried": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "This will be true if the write command that caused this had to be retried again due to a topology change.", "constantName": "org.apache.camel.component.infinispan.InfinispanConstants#COMMAND_RETRIED" }
},
"properties": {
"cacheName": { "kind": "path", "displayName": "Cache Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache to use. Use current to use the existing cache name from the currently configured cached manager. Or use default for the default cache manager name." },
Expand Down
122 changes: 122 additions & 0 deletions components-starter/camel-infinispan-starter/pom.xml
Expand Up @@ -38,11 +38,133 @@
<artifactId>camel-infinispan</artifactId>
<version>${camel-version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test-spring-junit5</artifactId>
<version>${camel-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-master-starter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test-infra-infinispan</artifactId>
<version>${camel-version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<!-- testing - infinispan -->
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-core</artifactId>
<version>${infinispan-version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-commons-test</artifactId>
<version>${infinispan-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-spring5-remote</artifactId>
<version>${infinispan-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.infinispan.protostream</groupId>
<artifactId>sample-domain-definition</artifactId>
<version>${protostream-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.infinispan.protostream</groupId>
<artifactId>sample-domain-implementation</artifactId>
<version>${protostream-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<!--START OF GENERATED CODE-->
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-core-starter</artifactId>
</dependency>
<!--END OF GENERATED CODE-->
</dependencies>
<profiles>
<!-- activate integration test if the docker socket file is accessible -->
<profile>
<id>infinispan-integration-tests-docker-file</id>
<activation>
<file>
<exists>/var/run/docker.sock</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<visibleassertions.silence>true</visibleassertions.silence>
</systemPropertyVariables>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- activate integration test if the DOCKER_HOST env var is set -->
<profile>
<id>infinispan-integration-tests-docker-env</id>
<activation>
<property>
<name>env.DOCKER_HOST</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<visibleassertions.silence>true</visibleassertions.silence>
</systemPropertyVariables>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>