You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2023/07/31 13:28:06 UTC

[camel-quarkus] branch main updated: Remove redundant autowiring workaround in aws2-cw tests

This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/main by this push:
     new d11a8b89c6 Remove redundant autowiring workaround in aws2-cw tests
d11a8b89c6 is described below

commit d11a8b89c61bed3790ba8a5cc26e25c645712a22
Author: James Netherton <ja...@gmail.com>
AuthorDate: Mon Jul 31 11:38:56 2023 +0100

    Remove redundant autowiring workaround in aws2-cw tests
    
    Fixes #4400
---
 .../apache/camel/quarkus/component/aws2/cw/it/ClientBuilder.java | 9 ---------
 .../aws2/aws2-cw/src/main/resources/application.properties       | 1 +
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/integration-test-groups/aws2/aws2-cw/src/main/java/org/apache/camel/quarkus/component/aws2/cw/it/ClientBuilder.java b/integration-test-groups/aws2/aws2-cw/src/main/java/org/apache/camel/quarkus/component/aws2/cw/it/ClientBuilder.java
index 194f1411be..ed278134a4 100644
--- a/integration-test-groups/aws2/aws2-cw/src/main/java/org/apache/camel/quarkus/component/aws2/cw/it/ClientBuilder.java
+++ b/integration-test-groups/aws2/aws2-cw/src/main/java/org/apache/camel/quarkus/component/aws2/cw/it/ClientBuilder.java
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.quarkus.component.aws2.cw.it;
 
-import jakarta.enterprise.inject.Produces;
 import jakarta.inject.Named;
 import org.apache.camel.component.aws2.cw.CloudWatchClientMock;
 import software.amazon.awssdk.services.cloudwatch.CloudWatchClient;
@@ -27,12 +26,4 @@ public class ClientBuilder {
     CloudWatchClient produceClient() {
         return new CloudWatchClientMock();
     }
-
-    @Produces
-    @Named("customClient2")
-    CloudWatchClient produceClient2() {
-        //second client is required to avoid autowiring of the first client if there is only one client
-        //workaround because of https://github.com/apache/camel-quarkus/issues/4400
-        return new CloudWatchClientMock();
-    }
 }
diff --git a/integration-test-groups/aws2/aws2-cw/src/main/resources/application.properties b/integration-test-groups/aws2/aws2-cw/src/main/resources/application.properties
index e2e30305a2..04934aaa7b 100644
--- a/integration-test-groups/aws2/aws2-cw/src/main/resources/application.properties
+++ b/integration-test-groups/aws2/aws2-cw/src/main/resources/application.properties
@@ -19,3 +19,4 @@ camel.component.aws2-cw.access-key=${AWS_ACCESS_KEY}
 camel.component.aws2-cw.secret-key=${AWS_SECRET_KEY}
 camel.component.aws2-cw.useDefaultCredentialsProvider=${AWS_USE_DEFAULT_CREDENTIALS_PROVIDER}
 camel.component.aws2-cw.region=${AWS_REGION:us-east-1}
+camel.component.aws2-cw.autowired-enabled=false