This is an automated email from the ASF dual-hosted git repository.
apupier 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 f0b5c571b4b CAMEL-21334 - Open search ppc64le integration tests
activation
f0b5c571b4b is described below
commit f0b5c571b4bcb564eea54deb5b4dfcc91dcbef56
Author: Aurélien Pupier <[email protected]>
AuthorDate: Tue Oct 15 16:05:15 2024 +0200
CAMEL-21334 - Open search ppc64le integration tests activation
kudos to @anushkajuli
Signed-off-by: Aurélien Pupier <[email protected]>
---
components/camel-opensearch/pom.xml | 1 -
.../infra/opensearch/common/OpenSearchProperties.java | 1 +
.../services/OpenSearchLocalContainerService.java | 16 ++++++++++++++--
.../test/infra/opensearch/services/container.properties | 1 +
4 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/components/camel-opensearch/pom.xml
b/components/camel-opensearch/pom.xml
index 1cdaf79ae93..7e79a43367a 100644
--- a/components/camel-opensearch/pom.xml
+++ b/components/camel-opensearch/pom.xml
@@ -34,7 +34,6 @@
<properties>
<!-- OpenSearch container is not available on these platforms -->
- <skipITs.ppc64le>true</skipITs.ppc64le>
<skipITs.s390x>true</skipITs.s390x>
<camel.surefire.reuseForks>true</camel.surefire.reuseForks>
diff --git
a/test-infra/camel-test-infra-opensearch/src/test/java/org/apache/camel/test/infra/opensearch/common/OpenSearchProperties.java
b/test-infra/camel-test-infra-opensearch/src/test/java/org/apache/camel/test/infra/opensearch/common/OpenSearchProperties.java
index 03bca15e2ad..6e2fb94e56a 100644
---
a/test-infra/camel-test-infra-opensearch/src/test/java/org/apache/camel/test/infra/opensearch/common/OpenSearchProperties.java
+++
b/test-infra/camel-test-infra-opensearch/src/test/java/org/apache/camel/test/infra/opensearch/common/OpenSearchProperties.java
@@ -25,6 +25,7 @@ public final class OpenSearchProperties {
public static final String OPEN_SEARCH_USERNAME = "opensearch.username";
public static final String OPEN_SEARCH_PASSWORD = "opensearch.password";
public static final String OPEN_SEARCH_CONTAINER = "opensearch.container";
+ public static final String OPEN_SEARCH_CONTAINER_PPC64LE =
"opensearch.container.ppc64le";
public static final String OPEN_SEARCH_CONTAINER_STARTUP
= OPEN_SEARCH_CONTAINER +
ContainerEnvironmentUtil.STARTUP_ATTEMPTS_PROPERTY;
diff --git
a/test-infra/camel-test-infra-opensearch/src/test/java/org/apache/camel/test/infra/opensearch/services/OpenSearchLocalContainerService.java
b/test-infra/camel-test-infra-opensearch/src/test/java/org/apache/camel/test/infra/opensearch/services/OpenSearchLocalContainerService.java
index f572c629355..52629288911 100644
---
a/test-infra/camel-test-infra-opensearch/src/test/java/org/apache/camel/test/infra/opensearch/services/OpenSearchLocalContainerService.java
+++
b/test-infra/camel-test-infra-opensearch/src/test/java/org/apache/camel/test/infra/opensearch/services/OpenSearchLocalContainerService.java
@@ -28,6 +28,8 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testcontainers.containers.output.Slf4jLogConsumer;
import org.testcontainers.containers.wait.strategy.LogMessageWaitStrategy;
+import org.testcontainers.shaded.org.apache.commons.lang3.SystemUtils;
+import org.testcontainers.utility.DockerImageName;
public class OpenSearchLocalContainerService implements OpenSearchService,
ContainerService<OpensearchContainer> {
private static final Logger LOG =
LoggerFactory.getLogger(OpenSearchLocalContainerService.class);
@@ -38,7 +40,15 @@ public class OpenSearchLocalContainerService implements
OpenSearchService, Conta
public OpenSearchLocalContainerService() {
this(LocalPropertyResolver.getProperty(OpenSearchLocalContainerService.class,
- OpenSearchProperties.OPEN_SEARCH_CONTAINER));
+ getPropertyKeyForContainerImage()));
+ }
+
+ private static String getPropertyKeyForContainerImage() {
+ if ("ppc64le".equals(SystemUtils.OS_ARCH)) {
+ return OpenSearchProperties.OPEN_SEARCH_CONTAINER_PPC64LE;
+ } else {
+ return OpenSearchProperties.OPEN_SEARCH_CONTAINER;
+ }
}
public OpenSearchLocalContainerService(String imageName) {
@@ -50,7 +60,9 @@ public class OpenSearchLocalContainerService implements
OpenSearchService, Conta
}
protected OpensearchContainer initContainer(String imageName) {
- OpensearchContainer opensearchContainer = new
OpensearchContainer(imageName);
+ DockerImageName customImage = DockerImageName.parse(imageName)
+ .asCompatibleSubstituteFor("opensearchproject/opensearch");
+ OpensearchContainer opensearchContainer = new
OpensearchContainer(customImage);
// Increase the timeout from 60 seconds to 90 seconds to ensure that
it will be long enough
// on the build pipeline
opensearchContainer.setWaitStrategy(
diff --git
a/test-infra/camel-test-infra-opensearch/src/test/resources/org/apache/camel/test/infra/opensearch/services/container.properties
b/test-infra/camel-test-infra-opensearch/src/test/resources/org/apache/camel/test/infra/opensearch/services/container.properties
index 1ad5a3829aa..00026c7d689 100644
---
a/test-infra/camel-test-infra-opensearch/src/test/resources/org/apache/camel/test/infra/opensearch/services/container.properties
+++
b/test-infra/camel-test-infra-opensearch/src/test/resources/org/apache/camel/test/infra/opensearch/services/container.properties
@@ -15,3 +15,4 @@
## limitations under the License.
## ---------------------------------------------------------------------------
opensearch.container=opensearchproject/opensearch:2.14.0
+opensearch.container.ppc64le=icr.io/ppc64le-oss/opensearch-ppc64le:2.12.0