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

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

commit d1c9733a204b00d398f1f121fa699a802d4ea0ac
Author: Peter Palaga <[email protected]>
AuthorDate: Mon Feb 8 21:06:32 2021 +0100

    Test AWS 2 SQS properly
---
 .../test/support/aws2/Aws2TestResource.java        |  34 +++--
 integration-tests/aws2-sqs/README.adoc             |  21 +++
 integration-tests/aws2-sqs/pom.xml                 | 146 +++++++++++++++++++++
 .../component/aws2/sqs/it/Aws2SqsResource.java     |  81 ++++++++++++
 .../src/main/resources/application.properties      |  20 +++
 .../quarkus/component/aws2/sqs/it/Aws2SqsIT.java   |  26 ++++
 .../quarkus/component/aws2/sqs/it/Aws2SqsTest.java |  66 ++++++++++
 .../component/aws2/sqs/it/Aws2SqsTestResource.java |  71 ++++++++++
 integration-tests/aws2/pom.xml                     |   4 -
 .../camel/quarkus/component/aws2/CamelRoute.java   |   5 -
 .../aws2/src/main/resources/application.properties |   4 -
 integration-tests/pom.xml                          |   1 +
 tooling/scripts/test-categories.yaml               |   1 +
 13 files changed, 456 insertions(+), 24 deletions(-)

diff --git 
a/integration-tests-support/aws2/src/main/java/org/apache/camel/quarkus/test/support/aws2/Aws2TestResource.java
 
b/integration-tests-support/aws2/src/main/java/org/apache/camel/quarkus/test/support/aws2/Aws2TestResource.java
index 54ab6c5..859488f 100644
--- 
a/integration-tests-support/aws2/src/main/java/org/apache/camel/quarkus/test/support/aws2/Aws2TestResource.java
+++ 
b/integration-tests-support/aws2/src/main/java/org/apache/camel/quarkus/test/support/aws2/Aws2TestResource.java
@@ -35,7 +35,7 @@ public abstract class Aws2TestResource implements 
ContainerResourceLifecycleMana
 
     protected final ArrayList<AutoCloseable> closeables = new ArrayList<>();
 
-    private final Service[] services;
+    protected final Service[] services;
 
     protected LocalStackContainer localstack;
 
@@ -64,7 +64,7 @@ public abstract class Aws2TestResource implements 
ContainerResourceLifecycleMana
         usingMockBackend = startMockBackend && !realCredentialsProvided;
         if (usingMockBackend) {
             MockBackendUtils.logMockBackendUsed();
-            this.localstack = new 
LocalStackContainer(DockerImageName.parse("localstack/localstack:0.11.3"))
+            this.localstack = new 
LocalStackContainer(DockerImageName.parse("localstack/localstack:0.12.6"))
                     .withServices(services);
             closeables.add(localstack);
             localstack.start();
@@ -73,15 +73,7 @@ public abstract class Aws2TestResource implements 
ContainerResourceLifecycleMana
             this.secretKey = localstack.getSecretKey();
             this.region = localstack.getRegion();
 
-            for (Service service : services) {
-                String s = serviceKey(service);
-                result.put("camel.component.aws2-" + s + ".access-key", 
accessKey);
-                result.put("camel.component.aws2-" + s + ".secret-key", 
secretKey);
-                result.put("camel.component.aws2-" + s + ".override-endpoint", 
"true");
-                result.put("camel.component.aws2-" + s + 
".uri-endpoint-override",
-                        localstack.getEndpointOverride(service).toString());
-                result.put("camel.component.aws2-" + s + ".region", region);
-            }
+            setMockProperties(result);
 
         } else {
             if (!startMockBackend && !realCredentialsProvided) {
@@ -97,6 +89,26 @@ public abstract class Aws2TestResource implements 
ContainerResourceLifecycleMana
         return result;
     }
 
+    protected void setMockProperties(final Map<String, String> result) {
+        for (Service service : services) {
+            String s = serviceKey(service);
+            result.put("camel.component.aws2-" + s + ".access-key", accessKey);
+            result.put("camel.component.aws2-" + s + ".secret-key", secretKey);
+            result.put("camel.component.aws2-" + s + ".region", region);
+
+            switch (service) {
+            case SQS:
+                // TODO https://github.com/apache/camel-quarkus/issues/2216
+                break;
+            default:
+                result.put("camel.component.aws2-" + s + ".override-endpoint", 
"true");
+                result.put("camel.component.aws2-" + s + 
".uri-endpoint-override",
+                        localstack.getEndpointOverride(service).toString());
+                break;
+            }
+        }
+    }
+
     protected String serviceKey(Service service) {
         return service.name().toLowerCase(Locale.ROOT);
     }
diff --git a/integration-tests/aws2-sqs/README.adoc 
b/integration-tests/aws2-sqs/README.adoc
new file mode 100644
index 0000000..3a8dc7a
--- /dev/null
+++ b/integration-tests/aws2-sqs/README.adoc
@@ -0,0 +1,21 @@
+== AWS 2 SQS integration tests
+
+By default, the tests are skipped because Localstack does not work, see 
https://github.com/apache/camel-quarkus/issues/2216
+
+To run the tests against the real AWS API, you need to
+
+* Export Your
+  
https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys[AWS
 credentials]
+  (access key ID and secret access key)
+* Export our preferred
+  
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-available-regions[AWS
 region].
+
+[source,shell]
+----
+export AWS_ACCESS_KEY=<your-access-key-id>
+export AWS_SECRET_KEY=<your-secret-access-key>
+export AWS_REGION=eu-central-1
+----
+
+You may want to `export CAMEL_QUARKUS_START_MOCK_BACKEND=false` to force 
testing against
+the real AWS API.
\ No newline at end of file
diff --git a/integration-tests/aws2-sqs/pom.xml 
b/integration-tests/aws2-sqs/pom.xml
new file mode 100644
index 0000000..a4c5a7d
--- /dev/null
+++ b/integration-tests/aws2-sqs/pom.xml
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.camel.quarkus</groupId>
+        <artifactId>camel-quarkus-integration-tests</artifactId>
+        <version>1.7.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-integration-test-aws2-sqs</artifactId>
+    <name>Camel Quarkus :: Integration Tests :: AWS 2 Simple Queue Service 
(SQS)</name>
+    <description>Integration tests for Camel Quarkus AWS 2 Simple Queue 
Service (SQS) extension</description>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom-test</artifactId>
+                <version>${project.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-main</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-aws2-sqs</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-resteasy</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-resteasy-jackson</artifactId>
+        </dependency>
+
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-junit5</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.rest-assured</groupId>
+            <artifactId>rest-assured</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            
<artifactId>camel-quarkus-integration-tests-support-aws2</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.awaitility</groupId>
+            <artifactId>awaitility</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <!-- The following dependencies guarantee that this module is built 
after them. You can update them by running `mvn process-resources -Pformat -N` 
from the source tree root directory -->
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-aws2-sqs-deployment</artifactId>
+            <version>${project.version}</version>
+            <type>pom</type>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-main-deployment</artifactId>
+            <version>${project.version}</version>
+            <type>pom</type>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+
+    <profiles>
+        <profile>
+            <id>native</id>
+            <activation>
+                <property>
+                    <name>native</name>
+                </property>
+            </activation>
+            <properties>
+                <quarkus.package.type>native</quarkus.package.type>
+            </properties>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-failsafe-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <goals>
+                                    <goal>integration-test</goal>
+                                    <goal>verify</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
+</project>
diff --git 
a/integration-tests/aws2-sqs/src/main/java/org/apache/camel/quarkus/component/aws2/sqs/it/Aws2SqsResource.java
 
b/integration-tests/aws2-sqs/src/main/java/org/apache/camel/quarkus/component/aws2/sqs/it/Aws2SqsResource.java
new file mode 100644
index 0000000..042890d
--- /dev/null
+++ 
b/integration-tests/aws2-sqs/src/main/java/org/apache/camel/quarkus/component/aws2/sqs/it/Aws2SqsResource.java
@@ -0,0 +1,81 @@
+/*
+ * 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.quarkus.component.aws2.sqs.it;
+
+import java.net.URI;
+import java.util.List;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.apache.camel.ConsumerTemplate;
+import org.apache.camel.ProducerTemplate;
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+import software.amazon.awssdk.services.sqs.model.ListQueuesResponse;
+
+@Path("/aws2-sqs")
+@ApplicationScoped
+public class Aws2SqsResource {
+
+    @ConfigProperty(name = "aws-sqs.queue-name")
+    String queueName;
+
+    @Inject
+    ProducerTemplate producerTemplate;
+
+    @Inject
+    ConsumerTemplate consumerTemplate;
+
+    @Path("/send")
+    @POST
+    @Consumes(MediaType.TEXT_PLAIN)
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response send(String message) throws Exception {
+        final String response = producerTemplate.requestBody(componentUri(), 
message, String.class);
+        return Response
+                .created(new URI("https://camel.apache.org/";))
+                .entity(response)
+                .build();
+    }
+
+    @Path("/receive")
+    @GET
+    @Produces(MediaType.APPLICATION_JSON)
+    public String receive() throws Exception {
+        return consumerTemplate.receiveBody(componentUri(), 10000, 
String.class);
+    }
+
+    @Path("/queues")
+    @GET
+    @Produces(MediaType.APPLICATION_JSON)
+    public List<String> listQueues() throws Exception {
+        return producerTemplate.requestBody(componentUri() + 
"?operation=listQueues", null, ListQueuesResponse.class)
+                .queueUrls();
+    }
+
+    private String componentUri() {
+        return "aws2-sqs://" + queueName;
+    }
+
+}
diff --git 
a/integration-tests/aws2-sqs/src/main/resources/application.properties 
b/integration-tests/aws2-sqs/src/main/resources/application.properties
new file mode 100644
index 0000000..3bf5d35
--- /dev/null
+++ b/integration-tests/aws2-sqs/src/main/resources/application.properties
@@ -0,0 +1,20 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+camel.component.aws2-sqs.access-key=${AWS_ACCESS_KEY}
+camel.component.aws2-sqs.secret-key=${AWS_SECRET_KEY}
+camel.component.aws2-sqs.region=${AWS_REGION:us-east-1}
diff --git 
a/integration-tests/aws2-sqs/src/test/java/org/apache/camel/quarkus/component/aws2/sqs/it/Aws2SqsIT.java
 
b/integration-tests/aws2-sqs/src/test/java/org/apache/camel/quarkus/component/aws2/sqs/it/Aws2SqsIT.java
new file mode 100644
index 0000000..4212303
--- /dev/null
+++ 
b/integration-tests/aws2-sqs/src/test/java/org/apache/camel/quarkus/component/aws2/sqs/it/Aws2SqsIT.java
@@ -0,0 +1,26 @@
+/*
+ * 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.quarkus.component.aws2.sqs.it;
+
+import io.quarkus.test.junit.NativeImageTest;
+import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
+
+@NativeImageTest
+@EnabledIfEnvironmentVariable(named = "AWS_ACCESS_KEY", matches = 
"[a-zA-Z0-9]+") // TODO https://github.com/apache/camel-quarkus/issues/2216
+class Aws2SqsIT extends Aws2SqsTest {
+
+}
diff --git 
a/integration-tests/aws2-sqs/src/test/java/org/apache/camel/quarkus/component/aws2/sqs/it/Aws2SqsTest.java
 
b/integration-tests/aws2-sqs/src/test/java/org/apache/camel/quarkus/component/aws2/sqs/it/Aws2SqsTest.java
new file mode 100644
index 0000000..92bb9ee
--- /dev/null
+++ 
b/integration-tests/aws2-sqs/src/test/java/org/apache/camel/quarkus/component/aws2/sqs/it/Aws2SqsTest.java
@@ -0,0 +1,66 @@
+/*
+ * 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.quarkus.component.aws2.sqs.it;
+
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Stream;
+
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+import org.awaitility.Awaitility;
+import org.eclipse.microprofile.config.Config;
+import org.eclipse.microprofile.config.ConfigProvider;
+import org.hamcrest.Matchers;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
+
+@QuarkusTest
+@QuarkusTestResource(Aws2SqsTestResource.class)
+@EnabledIfEnvironmentVariable(named = "AWS_ACCESS_KEY", matches = 
"[a-zA-Z0-9]+") // TODO
+                                                                               
   // https://github.com/apache/camel-quarkus/issues/2216
+class Aws2SqsTest {
+
+    @Test
+    public void sendReceive() {
+        final Config config = ConfigProvider.getConfig();
+        final String queueName = config.getValue("aws-sqs.queue-name", 
String.class);
+
+        String[] queues = RestAssured.get("/aws2-sqs/queues")
+                .then()
+                .statusCode(200)
+                .extract()
+                .body().as(String[].class);
+        Assertions.assertTrue(Stream.of(queues).anyMatch(url -> 
url.contains(queueName)));
+
+        final String msg = java.util.UUID.randomUUID().toString().replace("-", 
"");
+        RestAssured.given() //
+                .contentType(ContentType.TEXT)
+                .body(msg)
+                .post("/aws2-sqs/send") //
+                .then()
+                .statusCode(201);
+
+        Awaitility.await().pollInterval(1, TimeUnit.SECONDS).atMost(120, 
TimeUnit.SECONDS).until(
+                () -> 
RestAssured.get("/aws2-sqs/receive").then().statusCode(200).extract().body().asString(),
+                Matchers.is(msg));
+
+    }
+
+}
diff --git 
a/integration-tests/aws2-sqs/src/test/java/org/apache/camel/quarkus/component/aws2/sqs/it/Aws2SqsTestResource.java
 
b/integration-tests/aws2-sqs/src/test/java/org/apache/camel/quarkus/component/aws2/sqs/it/Aws2SqsTestResource.java
new file mode 100644
index 0000000..e92d256
--- /dev/null
+++ 
b/integration-tests/aws2-sqs/src/test/java/org/apache/camel/quarkus/component/aws2/sqs/it/Aws2SqsTestResource.java
@@ -0,0 +1,71 @@
+/*
+ * 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.quarkus.component.aws2.sqs.it;
+
+import java.util.Collections;
+import java.util.Locale;
+import java.util.Map;
+
+import org.apache.camel.quarkus.test.support.aws2.Aws2TestResource;
+import org.apache.commons.lang3.RandomStringUtils;
+import org.testcontainers.containers.localstack.LocalStackContainer;
+import org.testcontainers.containers.localstack.LocalStackContainer.Service;
+import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
+import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
+import software.amazon.awssdk.regions.Region;
+import software.amazon.awssdk.services.sqs.SqsClient;
+import software.amazon.awssdk.services.sqs.SqsClientBuilder;
+import software.amazon.awssdk.services.sqs.model.CreateQueueRequest;
+import software.amazon.awssdk.services.sqs.model.CreateQueueResponse;
+import software.amazon.awssdk.services.sqs.model.DeleteQueueRequest;
+
+public class Aws2SqsTestResource extends Aws2TestResource {
+
+    public Aws2SqsTestResource() {
+        super(Service.SQS);
+    }
+
+    @Override
+    public Map<String, String> start() {
+        Map<String, String> result = super.start();
+
+        final String queueName = "camel-quarkus-" + 
RandomStringUtils.randomAlphanumeric(49).toLowerCase(Locale.ROOT);
+        result.put("aws-sqs.queue-name", queueName);
+
+        final SqsClientBuilder clientBuilder = SqsClient
+                .builder()
+                
.credentialsProvider(StaticCredentialsProvider.create(AwsBasicCredentials.create(accessKey,
 secretKey)))
+                .region(Region.of(region));
+        if (usingMockBackend) {
+            
clientBuilder.endpointOverride(localstack.getEndpointOverride(LocalStackContainer.Service.SQS));
+        }
+        final SqsClient sqsClient = clientBuilder.build();
+
+        CreateQueueResponse q = 
sqsClient.createQueue(CreateQueueRequest.builder().queueName(queueName).build());
+        final String queueUrl = q.queueUrl();
+        if (usingMockBackend) {
+            result.put("camel.component.aws2-sqs.queue-url", queueUrl);
+        }
+        closeables.add(() -> {
+            
sqsClient.deleteQueue(DeleteQueueRequest.builder().queueUrl(queueUrl).build());
+            sqsClient.close();
+        });
+
+        return Collections.unmodifiableMap(result);
+    }
+
+}
diff --git a/integration-tests/aws2/pom.xml b/integration-tests/aws2/pom.xml
index 95e8a69..2846d53 100644
--- a/integration-tests/aws2/pom.xml
+++ b/integration-tests/aws2/pom.xml
@@ -88,10 +88,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
-            <artifactId>camel-quarkus-aws2-sqs</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.camel.quarkus</groupId>
             <artifactId>camel-quarkus-aws2-sts</artifactId>
         </dependency>
         <dependency>
diff --git 
a/integration-tests/aws2/src/main/java/org/apache/camel/quarkus/component/aws2/CamelRoute.java
 
b/integration-tests/aws2/src/main/java/org/apache/camel/quarkus/component/aws2/CamelRoute.java
index c30ec40..2767b14 100644
--- 
a/integration-tests/aws2/src/main/java/org/apache/camel/quarkus/component/aws2/CamelRoute.java
+++ 
b/integration-tests/aws2/src/main/java/org/apache/camel/quarkus/component/aws2/CamelRoute.java
@@ -26,11 +26,6 @@ public class CamelRoute extends RouteBuilder {
     @Override
     public void configure() {
 
-        from("timer:quarkus-sqs?repeatCount=1")
-                .setBody(constant("Quarkus is great!"))
-                .to("aws2-sqs://camel-1?delaySeconds=5")
-                .to("log:sf?showAll=true");
-
         from("timer:quarkus-sns?repeatCount=1")
                 .setBody(constant("Quarkus is great!"))
                 .to("aws2-sns://topic1")
diff --git a/integration-tests/aws2/src/main/resources/application.properties 
b/integration-tests/aws2/src/main/resources/application.properties
index 3df0357..69b5294 100644
--- a/integration-tests/aws2/src/main/resources/application.properties
+++ b/integration-tests/aws2/src/main/resources/application.properties
@@ -18,10 +18,6 @@
 #
 # Camel :: AWS2 options
 #
-camel.component.aws2-sqs.access-key={{env:AWS_ACCESS_KEY}}
-camel.component.aws2-sqs.secret-key={{env:AWS_SECRET_KEY}}
-camel.component.aws2-sqs.region={{env:AWS_REGION}}
-
 camel.component.aws2-sns.access-key={{env:AWS_ACCESS_KEY}}
 camel.component.aws2-sns.secret-key={{env:AWS_SECRET_KEY}}
 camel.component.aws2-sns.region={{env:AWS_REGION}}
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index ccb619b..f38780d 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -69,6 +69,7 @@
         <module>aws</module>
         <module>aws2</module>
         <module>aws2-s3</module>
+        <module>aws2-sqs</module>
         <module>azure</module>
         <module>azure-eventhubs</module>
         <module>azure-storage-blob</module>
diff --git a/tooling/scripts/test-categories.yaml 
b/tooling/scripts/test-categories.yaml
index b17b719..d6982a2 100644
--- a/tooling/scripts/test-categories.yaml
+++ b/tooling/scripts/test-categories.yaml
@@ -165,6 +165,7 @@ platform:
   - rest-openapi
   - csimple
   - aws2-s3
+  - aws2-sqs
 saas:
   - box
   - github

Reply via email to