You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2022/11/28 11:30:33 UTC

[camel] branch main updated (028c54958ac -> 9dedb5afa34)

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

acosentino pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


    from 028c54958ac Sync deps
     new edd10e66bb2 Upgrade AWS SDK v2 to version 2.18.25
     new e500fd967e8 Upgrade AWS SDK v2 to version 2.18.25
     new 64b99a1ee25 Upgrade AWS SDK v2 to version 2.18.25
     new 6943ac0d073 Upgrade AWS SDK v2 to version 2.18.25
     new 7f11b076f7d Upgrade AWS SDK v2 to version 2.18.25
     new 9dedb5afa34 Sync deps and regen

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 camel-dependencies/pom.xml                         |   2 +-
 .../apache/camel/catalog/components/aws2-ec2.json  |   2 +-
 .../aws2/ddb/Ddb2ClientHealthCheckCustomTest.java  |  99 -------------------
 .../apache/camel/component/aws2/ec2/aws2-ec2.json  |   2 +-
 .../aws2/eks/EKS2CliientHealthCheckCustomTest.java | 100 -------------------
 .../S3CreateDownloadLinkOperationIT.java           |  18 +---
 .../Sqs2ConsumerHealthCheckCustomClientTest.java   | 107 ---------------------
 parent/pom.xml                                     |   2 +-
 .../test/infra/aws2/clients/AWSSDKClientUtils.java |   5 +
 9 files changed, 12 insertions(+), 325 deletions(-)
 delete mode 100644 components/camel-aws/camel-aws2-ddb/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2ClientHealthCheckCustomTest.java
 delete mode 100644 components/camel-aws/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2CliientHealthCheckCustomTest.java
 delete mode 100644 components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/Sqs2ConsumerHealthCheckCustomClientTest.java


[camel] 06/06: Sync deps and regen

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 9dedb5afa34a7381ee5f1e3899eb6d357205211b
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Nov 28 12:29:20 2022 +0100

    Sync deps and regen
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 camel-dependencies/pom.xml                                              | 2 +-
 .../resources/org/apache/camel/catalog/components/aws2-ec2.json         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/camel-dependencies/pom.xml b/camel-dependencies/pom.xml
index da9737e9944..f8b9bcc445d 100644
--- a/camel-dependencies/pom.xml
+++ b/camel-dependencies/pom.xml
@@ -65,7 +65,7 @@
     <avro-ipc-netty-version>1.11.1</avro-ipc-netty-version>
     <avro-version>1.11.1</avro-version>
     <awaitility-version>4.2.0</awaitility-version>
-    <aws-java-sdk2-version>2.17.295</aws-java-sdk2-version>
+    <aws-java-sdk2-version>2.18.25</aws-java-sdk2-version>
     <aws-xray-version>2.6.1</aws-xray-version>
     <axiom-version>1.2.14</axiom-version>
     <azure-sdk-bom-version>1.2.7</azure-sdk-bom-version>
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-ec2.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-ec2.json
index 21c1b5bd6c7..684b6f51aa4 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-ec2.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-ec2.json
@@ -41,7 +41,7 @@
   },
   "headers": {
     "CamelAwsEC2ImageId": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "An image ID of the AWS marketplace", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#IMAGE_ID" },
-    "CamelAwsEC2InstanceType": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.ec2.model.InstanceType", "enum": [ "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "c1.medium", "c1.xlarge", "c3.large", "c3.xlarge", "c3.2xlarge", "c3.4xlarge", "c3.8xlarge", "c4.large", "c4.xlarge", "c4.2xlarge", "c4.4xlarge", "c4.8xlarge", "c5.large", "c5.xlarge", "c5.2xlarge", "c5.4xlarge" [...]
+    "CamelAwsEC2InstanceType": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.ec2.model.InstanceType", "enum": [ "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "c1.medium", "c1.xlarge", "c3.large", "c3.xlarge", "c3.2xlarge", "c3.4xlarge", "c3.8xlarge", "c4.large", "c4.xlarge", "c4.2xlarge", "c4.4xlarge", "c4.8xlarge", "c5.large", "c5.xlarge", "c5.2xlarge", "c5.4xlarge" [...]
     "CamelAwsEC2Operation": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation we want to perform", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#OPERATION" },
     "CamelAwsEC2InstanceMinCount": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The minimum number of instances we want to run.", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCE_MIN_COUNT" },
     "CamelAwsEC2InstanceMaxCount": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The maximum number of instances we want to run.", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCE_MAX_COUNT" },


[camel] 01/06: Upgrade AWS SDK v2 to version 2.18.25

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit edd10e66bb2e359e40f810aeaf786752073592fa
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Nov 28 10:51:20 2022 +0100

    Upgrade AWS SDK v2 to version 2.18.25
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 parent/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/parent/pom.xml b/parent/pom.xml
index 451d627b45a..b62a82aeb53 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -81,7 +81,7 @@
         <avro-ipc-jetty-version>1.11.1</avro-ipc-jetty-version>
         <avro-ipc-netty-version>1.11.1</avro-ipc-netty-version>
         <awaitility-version>4.2.0</awaitility-version>
-        <aws-java-sdk2-version>2.17.295</aws-java-sdk2-version>
+        <aws-java-sdk2-version>2.18.25</aws-java-sdk2-version>
         <aws-xray-version>2.6.1</aws-xray-version>
         <axiom-version>1.2.14</axiom-version>
         <azure-sdk-bom-version>1.2.7</azure-sdk-bom-version>


[camel] 03/06: Upgrade AWS SDK v2 to version 2.18.25

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 64b99a1ee25e89f075f20c7784b105c36b612758
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Nov 28 11:23:06 2022 +0100

    Upgrade AWS SDK v2 to version 2.18.25
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../integration/S3CreateDownloadLinkOperationIT.java   | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/components/camel-aws/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/integration/S3CreateDownloadLinkOperationIT.java b/components/camel-aws/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/integration/S3CreateDownloadLinkOperationIT.java
index f1c49719fdf..8d272125aec 100644
--- a/components/camel-aws/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/integration/S3CreateDownloadLinkOperationIT.java
+++ b/components/camel-aws/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/integration/S3CreateDownloadLinkOperationIT.java
@@ -68,14 +68,6 @@ public class S3CreateDownloadLinkOperationIT extends Aws2S3Base {
             }
         });
 
-        Exchange ex2 = template.request("direct:createDownloadLinkWithoutCredentials", new Processor() {
-            public void process(Exchange exchange) {
-                exchange.getIn().setHeader(AWS2S3Constants.KEY, "CamelUnitTest2");
-                exchange.getIn().setHeader(AWS2S3Constants.BUCKET_NAME, "mycamel2");
-                exchange.getIn().setHeader(AWS2S3Constants.S3_OPERATION, AWS2S3Operations.createDownloadLink);
-            }
-        });
-
         Exchange ex3 = template.request("direct:createDownloadLinkWithUriOverride", new Processor() {
             public void process(Exchange exchange) {
                 exchange.getIn().setHeader(AWS2S3Constants.KEY, "CamelUnitTest2");
@@ -88,11 +80,9 @@ public class S3CreateDownloadLinkOperationIT extends Aws2S3Base {
         assertNotNull(downloadLink);
         assertTrue(downloadLink.startsWith("https://mycamel2.s3.eu-west-1.amazonaws.com"));
 
-        assertNull(ex2.getMessage().getBody());
-
         String downloadLinkWithUriOverride = ex3.getMessage().getBody(String.class);
         assertNotNull(downloadLinkWithUriOverride);
-        assertTrue(downloadLinkWithUriOverride.startsWith("http://localhost:8080"));
+        assertTrue(downloadLinkWithUriOverride.startsWith("http://mycamel2.localhost:8080"));
 
         MockEndpoint.assertIsSatisfied(context);
     }
@@ -104,11 +94,9 @@ public class S3CreateDownloadLinkOperationIT extends Aws2S3Base {
             public void configure() {
                 String awsEndpoint = "aws2-s3://mycamel2?autoCreateBucket=true";
 
-                from("direct:listBucket").to(awsEndpoint);
-
-                from("direct:addObject").to(awsEndpoint);
+                from("direct:listBucket").to(awsEndpoint + "&accessKey=xxx&secretKey=yyy&region=eu-west-1");
 
-                from("direct:createDownloadLinkWithoutCredentials").to(awsEndpoint).to("mock:result");
+                from("direct:addObject").to(awsEndpoint + "&accessKey=xxx&secretKey=yyy&region=eu-west-1");
 
                 from("direct:createDownloadLink").to(awsEndpoint + "&accessKey=xxx&secretKey=yyy&region=eu-west-1")
                         .to("mock:result");


[camel] 04/06: Upgrade AWS SDK v2 to version 2.18.25

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 6943ac0d073aca6beaf234d7f54828e0b5ba37c6
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Nov 28 11:40:52 2022 +0100

    Upgrade AWS SDK v2 to version 2.18.25
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../aws2/ddb/Ddb2ClientHealthCheckCustomTest.java  |  99 --------------------
 .../apache/camel/component/aws2/ec2/aws2-ec2.json  |   2 +-
 .../aws2/eks/EKS2CliientHealthCheckCustomTest.java | 100 ---------------------
 3 files changed, 1 insertion(+), 200 deletions(-)

diff --git a/components/camel-aws/camel-aws2-ddb/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2ClientHealthCheckCustomTest.java b/components/camel-aws/camel-aws2-ddb/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2ClientHealthCheckCustomTest.java
deleted file mode 100644
index f28446cb93e..00000000000
--- a/components/camel-aws/camel-aws2-ddb/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2ClientHealthCheckCustomTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.camel.component.aws2.ddb;
-
-import java.util.Collection;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.health.HealthCheck;
-import org.apache.camel.health.HealthCheckHelper;
-import org.apache.camel.health.HealthCheckRegistry;
-import org.apache.camel.impl.health.DefaultHealthCheckRegistry;
-import org.apache.camel.test.infra.aws2.clients.AWSSDKClientUtils;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import static org.testcontainers.shaded.org.awaitility.Awaitility.await;
-
-public class Ddb2ClientHealthCheckCustomTest extends CamelTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(Ddb2ClientHealthCheckCustomTest.class);
-
-    CamelContext context;
-
-    @Override
-    protected CamelContext createCamelContext() throws Exception {
-        context = super.createCamelContext();
-        context.getPropertiesComponent().setLocation("ref:prop");
-        Ddb2Component component = new Ddb2Component(context);
-        component.getConfiguration().setAmazonDDBClient(AWSSDKClientUtils.newDynamoDBClient());
-        component.init();
-        context.addComponent("aws2-ddb", component);
-
-        // install health check manually (yes a bit cumbersome)
-        HealthCheckRegistry registry = new DefaultHealthCheckRegistry();
-        registry.setCamelContext(context);
-        Object hc = registry.resolveById("context");
-        registry.register(hc);
-        hc = registry.resolveById("routes");
-        registry.register(hc);
-        hc = registry.resolveById("consumers");
-        registry.register(hc);
-        context.setExtension(HealthCheckRegistry.class, registry);
-
-        return context;
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() {
-        return new RouteBuilder() {
-
-            @Override
-            public void configure() {
-                from("direct:listTables")
-                        .to("aws2-ddb://test?enabledInitialDescribeTable=false");
-            }
-        };
-    }
-
-    @Test
-    public void testConnectivity() {
-
-        Collection<HealthCheck.Result> res = HealthCheckHelper.invokeLiveness(context);
-        boolean up = res.stream().allMatch(r -> r.getState().equals(HealthCheck.State.UP));
-        Assertions.assertTrue(up, "liveness check");
-
-        // health-check readiness should be down
-        await().atMost(20, TimeUnit.SECONDS).untilAsserted(() -> {
-            Collection<HealthCheck.Result> res2 = HealthCheckHelper.invokeReadiness(context);
-            boolean down = res2.stream().allMatch(r -> r.getState().equals(HealthCheck.State.DOWN));
-            boolean containsAws2DdbHealthCheck = res2.stream()
-                    .filter(result -> result.getCheck().getId().startsWith("aws2-ddb-client"))
-                    .findAny()
-                    .isPresent();
-            Assertions.assertTrue(down, "liveness check");
-            Assertions.assertTrue(containsAws2DdbHealthCheck, "aws2-ddb check");
-        });
-
-    }
-}
diff --git a/components/camel-aws/camel-aws2-ec2/src/generated/resources/org/apache/camel/component/aws2/ec2/aws2-ec2.json b/components/camel-aws/camel-aws2-ec2/src/generated/resources/org/apache/camel/component/aws2/ec2/aws2-ec2.json
index 21c1b5bd6c7..684b6f51aa4 100644
--- a/components/camel-aws/camel-aws2-ec2/src/generated/resources/org/apache/camel/component/aws2/ec2/aws2-ec2.json
+++ b/components/camel-aws/camel-aws2-ec2/src/generated/resources/org/apache/camel/component/aws2/ec2/aws2-ec2.json
@@ -41,7 +41,7 @@
   },
   "headers": {
     "CamelAwsEC2ImageId": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "An image ID of the AWS marketplace", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#IMAGE_ID" },
-    "CamelAwsEC2InstanceType": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.ec2.model.InstanceType", "enum": [ "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "c1.medium", "c1.xlarge", "c3.large", "c3.xlarge", "c3.2xlarge", "c3.4xlarge", "c3.8xlarge", "c4.large", "c4.xlarge", "c4.2xlarge", "c4.4xlarge", "c4.8xlarge", "c5.large", "c5.xlarge", "c5.2xlarge", "c5.4xlarge" [...]
+    "CamelAwsEC2InstanceType": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.ec2.model.InstanceType", "enum": [ "a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", "c1.medium", "c1.xlarge", "c3.large", "c3.xlarge", "c3.2xlarge", "c3.4xlarge", "c3.8xlarge", "c4.large", "c4.xlarge", "c4.2xlarge", "c4.4xlarge", "c4.8xlarge", "c5.large", "c5.xlarge", "c5.2xlarge", "c5.4xlarge" [...]
     "CamelAwsEC2Operation": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation we want to perform", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#OPERATION" },
     "CamelAwsEC2InstanceMinCount": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The minimum number of instances we want to run.", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCE_MIN_COUNT" },
     "CamelAwsEC2InstanceMaxCount": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The maximum number of instances we want to run.", "constantName": "org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCE_MAX_COUNT" },
diff --git a/components/camel-aws/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2CliientHealthCheckCustomTest.java b/components/camel-aws/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2CliientHealthCheckCustomTest.java
deleted file mode 100644
index cf24d4e9518..00000000000
--- a/components/camel-aws/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2CliientHealthCheckCustomTest.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.camel.component.aws2.eks;
-
-import java.util.Collection;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.health.HealthCheck;
-import org.apache.camel.health.HealthCheckHelper;
-import org.apache.camel.health.HealthCheckRegistry;
-import org.apache.camel.impl.health.DefaultHealthCheckRegistry;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import software.amazon.awssdk.regions.Region;
-import software.amazon.awssdk.services.eks.EksClient;
-
-import static org.testcontainers.shaded.org.awaitility.Awaitility.await;
-
-public class EKS2CliientHealthCheckCustomTest extends CamelTestSupport {
-
-    private static final Logger LOG = LoggerFactory.getLogger(EKS2CliientHealthCheckCustomTest.class);
-
-    CamelContext context;
-
-    @Override
-    protected CamelContext createCamelContext() throws Exception {
-        context = super.createCamelContext();
-        context.getPropertiesComponent().setLocation("ref:prop");
-        EKS2Component component = new EKS2Component(context);
-        component.getConfiguration().setEksClient(EksClient.builder().region(Region.of("Ciao")).build());
-        component.init();
-        context.addComponent("aws2-eks", component);
-
-        // install health check manually (yes a bit cumbersome)
-        HealthCheckRegistry registry = new DefaultHealthCheckRegistry();
-        registry.setCamelContext(context);
-        Object hc = registry.resolveById("context");
-        registry.register(hc);
-        hc = registry.resolveById("routes");
-        registry.register(hc);
-        hc = registry.resolveById("consumers");
-        registry.register(hc);
-        context.setExtension(HealthCheckRegistry.class, registry);
-
-        return context;
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() {
-        return new RouteBuilder() {
-
-            @Override
-            public void configure() {
-                from("direct:listClusters")
-                        .to("aws2-eks://test?operation=listClusters");
-            }
-        };
-    }
-
-    @Test
-    public void testConnectivity() {
-
-        Collection<HealthCheck.Result> res = HealthCheckHelper.invokeLiveness(context);
-        boolean up = res.stream().allMatch(r -> r.getState().equals(HealthCheck.State.UP));
-        Assertions.assertTrue(up, "liveness check");
-
-        // health-check readiness should be down
-        await().atMost(20, TimeUnit.SECONDS).untilAsserted(() -> {
-            Collection<HealthCheck.Result> res2 = HealthCheckHelper.invokeReadiness(context);
-            boolean down = res2.stream().allMatch(r -> r.getState().equals(HealthCheck.State.DOWN));
-            boolean containsAws2AthenaHealthCheck = res2.stream()
-                    .filter(result -> result.getCheck().getId().startsWith("aws2-eks-client"))
-                    .findAny()
-                    .isPresent();
-            Assertions.assertTrue(down, "liveness check");
-            Assertions.assertTrue(containsAws2AthenaHealthCheck, "aws2-eks check");
-        });
-
-    }
-}


[camel] 05/06: Upgrade AWS SDK v2 to version 2.18.25

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 7f11b076f7dfbeaa0258a0f298f6572038967911
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Nov 28 12:07:25 2022 +0100

    Upgrade AWS SDK v2 to version 2.18.25
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../Sqs2ConsumerHealthCheckCustomClientTest.java   | 107 ---------------------
 1 file changed, 107 deletions(-)

diff --git a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/Sqs2ConsumerHealthCheckCustomClientTest.java b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/Sqs2ConsumerHealthCheckCustomClientTest.java
deleted file mode 100644
index a13f4c6c32e..00000000000
--- a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/Sqs2ConsumerHealthCheckCustomClientTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.aws2.sqs;
-
-import java.util.Collection;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.health.HealthCheck;
-import org.apache.camel.health.HealthCheckHelper;
-import org.apache.camel.health.HealthCheckRegistry;
-import org.apache.camel.impl.health.DefaultHealthCheckRegistry;
-import org.apache.camel.test.infra.aws.common.services.AWSService;
-import org.apache.camel.test.infra.aws2.clients.AWSSDKClientUtils;
-import org.apache.camel.test.infra.aws2.services.AWSServiceFactory;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import static org.testcontainers.shaded.org.awaitility.Awaitility.await;
-
-public class Sqs2ConsumerHealthCheckCustomClientTest extends CamelTestSupport {
-
-    @RegisterExtension
-    public static AWSService service = AWSServiceFactory.createSQSService();
-
-    private static final Logger LOG = LoggerFactory.getLogger(Sqs2ConsumerHealthCheckCustomClientTest.class);
-
-    CamelContext context;
-
-    @Override
-    protected CamelContext createCamelContext() throws Exception {
-        context = super.createCamelContext();
-        context.getPropertiesComponent().setLocation("ref:prop");
-        Sqs2Component component = new Sqs2Component(context);
-        component.getConfiguration().setAmazonSQSClient(AWSSDKClientUtils.newSQSClient());
-        component.init();
-        context.addComponent("aws2-sqs", component);
-
-        // install health check manually (yes a bit cumbersome)
-        HealthCheckRegistry registry = new DefaultHealthCheckRegistry();
-        registry.setCamelContext(context);
-        Object hc = registry.resolveById("context");
-        registry.register(hc);
-        hc = registry.resolveById("routes");
-        registry.register(hc);
-        hc = registry.resolveById("consumers");
-        registry.register(hc);
-        context.setExtension(HealthCheckRegistry.class, registry);
-
-        return context;
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() {
-        return new RouteBuilder() {
-
-            @Override
-            public void configure() {
-                from("aws2-sqs://queue1?autoCreateQueue=true")
-                        .startupOrder(2).log("${body}").routeId("test-health-it");
-            }
-        };
-    }
-
-    @Test
-    public void testConnectivity() {
-
-        Collection<HealthCheck.Result> res = HealthCheckHelper.invokeLiveness(context);
-        boolean up = res.stream().allMatch(r -> r.getState().equals(HealthCheck.State.UP));
-        Assertions.assertTrue(up, "liveness check");
-
-        // health-check readiness should be down
-        await().atMost(20, TimeUnit.SECONDS).untilAsserted(() -> {
-            Collection<HealthCheck.Result> res2 = HealthCheckHelper.invokeReadiness(context);
-            boolean down = res2.stream().allMatch(r -> r.getState().equals(HealthCheck.State.DOWN));
-            boolean containsAws2SqsHealthCheck = res2.stream()
-                    .filter(result -> result.getCheck().getId().startsWith("aws2-sqs-consumer"))
-                    .findAny()
-                    .isPresent();
-            boolean hasRegionMessage = res2.stream()
-                    .anyMatch(r -> r.getMessage().stream().anyMatch(msg -> msg.contains("region")));
-            Assertions.assertTrue(down, "liveness check");
-            Assertions.assertTrue(containsAws2SqsHealthCheck, "aws2-sqs check");
-            Assertions.assertFalse(hasRegionMessage, "aws2-sqs check error message");
-        });
-
-    }
-}


[camel] 02/06: Upgrade AWS SDK v2 to version 2.18.25

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit e500fd967e826d656928de4f79f6de2d3692db91
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Nov 28 11:01:27 2022 +0100

    Upgrade AWS SDK v2 to version 2.18.25
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../org/apache/camel/test/infra/aws2/clients/AWSSDKClientUtils.java  | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test-infra/camel-test-infra-aws-v2/src/test/java/org/apache/camel/test/infra/aws2/clients/AWSSDKClientUtils.java b/test-infra/camel-test-infra-aws-v2/src/test/java/org/apache/camel/test/infra/aws2/clients/AWSSDKClientUtils.java
index c3302693904..e3daee023e7 100644
--- a/test-infra/camel-test-infra-aws-v2/src/test/java/org/apache/camel/test/infra/aws2/clients/AWSSDKClientUtils.java
+++ b/test-infra/camel-test-infra-aws-v2/src/test/java/org/apache/camel/test/infra/aws2/clients/AWSSDKClientUtils.java
@@ -38,6 +38,7 @@ import software.amazon.awssdk.services.kinesis.KinesisClient;
 import software.amazon.awssdk.services.kms.KmsClient;
 import software.amazon.awssdk.services.lambda.LambdaClient;
 import software.amazon.awssdk.services.s3.S3Client;
+import software.amazon.awssdk.services.s3.S3ClientBuilder;
 import software.amazon.awssdk.services.secretsmanager.SecretsManagerClient;
 import software.amazon.awssdk.services.sns.SnsClient;
 import software.amazon.awssdk.services.sqs.SqsClient;
@@ -103,6 +104,10 @@ public final class AWSSDKClientUtils {
             clientBuilder.credentialsProvider(new SystemPropertiesAWSCredentialsProvider());
         }
 
+        if (clientBuilder instanceof S3ClientBuilder) {
+            ((S3ClientBuilder) clientBuilder).forcePathStyle(true);
+        }
+
         Object o = clientBuilder.build();
         if (yClass.isInstance(o)) {
             return (Y) o;