Skip to content

Commit

Permalink
milvus ppc64le integration tests activation (#16624)
Browse files Browse the repository at this point in the history
  • Loading branch information
RadhikaAjabe7 authored Dec 20, 2024
1 parent 196b94b commit ac3894e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
2 changes: 0 additions & 2 deletions components/camel-ai/camel-milvus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@
<camel.surefire.parallel.factor>4</camel.surefire.parallel.factor>

<!-- Milvus is not available on these platforms -->
<skipITs.ppc64le>true</skipITs.ppc64le>
<skipITs.s390x>true</skipITs.s390x>
<skipTests.ppc64le>true</skipTests.ppc64le>
<skipTests.s390x>true</skipTests.s390x>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public final class MilvusProperties {

public static final String MILVUS_ENDPOINT_PORT = "milvus.endpoint.port";
public static final String MILVUS_CONTAINER = "milvus.container";
public static final String MILVUS_CONTAINER_PPC64LE = "milvus.container.ppc64le";

private MilvusProperties() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testcontainers.milvus.MilvusContainer;
import org.testcontainers.shaded.org.apache.commons.lang3.SystemUtils;
import org.testcontainers.utility.DockerImageName;

public class MilvusLocalContainerService implements MilvusService, ContainerService<MilvusContainer> {
Expand All @@ -35,7 +36,15 @@ public class MilvusLocalContainerService implements MilvusService, ContainerServ
private final MilvusContainer container;

public MilvusLocalContainerService() {
this(LocalPropertyResolver.getProperty(MilvusLocalContainerService.class, MilvusProperties.MILVUS_CONTAINER));
this(LocalPropertyResolver.getProperty(MilvusLocalContainerService.class, getPropertyKeyForContainerImage()));
}

private static String getPropertyKeyForContainerImage() {
if ("ppc64le".equals(SystemUtils.OS_ARCH)) {
return MilvusProperties.MILVUS_CONTAINER_PPC64LE;
} else {
return MilvusProperties.MILVUS_CONTAINER;
}
}

public MilvusLocalContainerService(String imageName) {
Expand All @@ -47,7 +56,7 @@ public MilvusLocalContainerService(MilvusContainer container) {
}

protected MilvusContainer initContainer(String imageName) {
return new MilvusContainer(DockerImageName.parse(imageName))
return new MilvusContainer(DockerImageName.parse(imageName).asCompatibleSubstituteFor("milvusdb/milvus"))
.withStartupTimeout(Duration.ofMinutes(3L));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
## limitations under the License.
## ---------------------------------------------------------------------------
milvus.container=milvusdb/milvus:v2.4.5
milvus.container.ppc64le=icr.io/ppc64le-oss/milvus-ppc64le:v2.4.11

0 comments on commit ac3894e

Please sign in to comment.