From 4382c73a5f87435fea9d407d63d7e1b8f56ffeec Mon Sep 17 00:00:00 2001 From: Peter Palaga Date: Fri, 4 Jun 2021 11:36:30 +0200 Subject: [PATCH] Upgrade to minio 8.2.1 in Camel 3.10 breaks Quarkiverse Minio and MinioClientProducer in our test #2503 --- .../quarkus/component/minio/it/MinioClientProducer.java | 7 +++---- .../quarkus/component/minio/it/MinioTestResource.java | 3 +-- pom.xml | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/integration-tests/minio/src/main/java/org/apache/camel/quarkus/component/minio/it/MinioClientProducer.java b/integration-tests/minio/src/main/java/org/apache/camel/quarkus/component/minio/it/MinioClientProducer.java index 2975beb26708..1f7a8324410f 100644 --- a/integration-tests/minio/src/main/java/org/apache/camel/quarkus/component/minio/it/MinioClientProducer.java +++ b/integration-tests/minio/src/main/java/org/apache/camel/quarkus/component/minio/it/MinioClientProducer.java @@ -16,9 +16,9 @@ */ package org.apache.camel.quarkus.component.minio.it; -import javax.enterprise.context.ApplicationScoped; import javax.enterprise.inject.Produces; import javax.inject.Named; +import javax.inject.Singleton; import io.minio.MinioClient; import org.eclipse.microprofile.config.ConfigProvider; @@ -26,12 +26,11 @@ public class MinioClientProducer { @Produces - @ApplicationScoped + @Singleton @Named("minioClient") public MinioClient produceMinioClient() { return MinioClient.builder() - .endpoint("http://" + ConfigProvider.getConfig().getValue("minio.server.host", String.class), - ConfigProvider.getConfig().getValue("minio.server.port", Integer.class), false) + .endpoint(ConfigProvider.getConfig().getValue("quarkus.minio.url", String.class)) .credentials(MinioResource.SERVER_ACCESS_KEY, MinioResource.SERVER_SECRET_KEY) .build(); } diff --git a/integration-tests/minio/src/test/java/org/apache/camel/quarkus/component/minio/it/MinioTestResource.java b/integration-tests/minio/src/test/java/org/apache/camel/quarkus/component/minio/it/MinioTestResource.java index 443169ac5521..e53e6116d1bd 100644 --- a/integration-tests/minio/src/test/java/org/apache/camel/quarkus/component/minio/it/MinioTestResource.java +++ b/integration-tests/minio/src/test/java/org/apache/camel/quarkus/component/minio/it/MinioTestResource.java @@ -49,8 +49,7 @@ public Map start() { String host = minioServer.getHost(); return CollectionHelper.mapOf( - "minio.server.host", host, - "minio.server.port", port); + "quarkus.minio.url", String.format("http://%s:%s", host, port)); } @Override diff --git a/pom.xml b/pom.xml index f5a2ceb728b9..0040b8fd9d43 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ 1.0.1 0.2.7 - 0.2.2 + 0.2.3 2.0.0.CR2 0.6.0 1.2.0 @@ -101,7 +101,7 @@ ${kudu-version} 1.4.32 ${netty3-version} - 8.1.0 + ${minio-version} ${mvel-version} 4.41.1 ${squareup-okhttp-version}