You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "JinyuChen97 (via GitHub)" <gi...@apache.org> on 2026/05/18 10:25:41 UTC

[PR] Add AWS 2 ECS integration tests [camel-quarkus]

JinyuChen97 opened a new pull request, #8668:
URL: https://github.com/apache/camel-quarkus/pull/8668

   Implemented integration tests for AWS 2 ECS extension following existing patterns:
   - Tests 4 ECS operations: createCluster, listClusters, describeCluster, deleteCluster
   - Uses WireMock for mock testing (ECS not supported in LocalStack free tier)
   - All tests pass in both JVM and Native modes
   - Verified against real AWS ECS service (us-west-1)
   
   Test results:
   - JVM mode: 5 tests passed
   - Native mode: 5 tests passed
   - WireMock mock mode: 5 tests passed
   - Real AWS verification: all operations successful
   
   Generated with Claude Code on behalf of Jinyu Chen
   
   Fixes #2397


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add AWS 2 ECS integration tests [camel-quarkus]

Posted by "JinyuChen97 (via GitHub)" <gi...@apache.org>.
JinyuChen97 commented on code in PR #8668:
URL: https://github.com/apache/camel-quarkus/pull/8668#discussion_r3266348767


##########
integration-test-groups/aws2/aws2-ecs/README.adoc:
##########
@@ -0,0 +1,26 @@
+= AWS ECS tests
+
+By default the tests run in WireMock playback mode using pre-recorded mappings from `src/test/resources/mappings/`.

Review Comment:
   my bad this part, the recording mode doesn't work for AWS services because wiremock must act as an HTTPS reerse proxy, which modifies request header and breaks aws sigv4 signature validation. Seems even aws sdk c2 own tests only use wiremock for playback. I have updated it in test README.doc



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add AWS 2 ECS integration tests [camel-quarkus]

Posted by "JinyuChen97 (via GitHub)" <gi...@apache.org>.
JinyuChen97 commented on PR #8668:
URL: https://github.com/apache/camel-quarkus/pull/8668#issuecomment-4487876822

   > Seems most of the `Aws2Msk` tests failed on the last CI run. Not sure if it's related to these changes.
   
   yes, the ECS testing has tests for cluster, the mapping name are same with MSK mapping name, so they got override by ECS, it caused MSK tests failed. I have change the mapping name to avoid they override each other.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add AWS 2 ECS integration tests [camel-quarkus]

Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton merged PR #8668:
URL: https://github.com/apache/camel-quarkus/pull/8668


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add AWS 2 ECS integration tests [camel-quarkus]

Posted by "JinyuChen97 (via GitHub)" <gi...@apache.org>.
JinyuChen97 commented on code in PR #8668:
URL: https://github.com/apache/camel-quarkus/pull/8668#discussion_r3266318779


##########
integration-test-groups/aws2/aws2-ecs/src/test/java/org/apache/camel/quarkus/component/aws2/ecs/it/GroupedAws2EcsTestResource.java:
##########
@@ -14,19 +14,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.quarkus.component.seda.it;
+package org.apache.camel.quarkus.component.aws2.ecs.it;
 
-import io.quarkus.test.junit.QuarkusIntegrationTest;
-import org.junit.jupiter.api.Test;
-
-@QuarkusIntegrationTest
-class SedaVirtualThreadsIT extends SedaVirtualThreadsTest {
-    /**
-     * Overridden to remove JDK version restrictions as the JDK used in native mode should be >= 25
-     */
-    @Override
-    @Test
-    void sedaExecutesOnVirtualThread() {
-        super.sedaExecutesOnVirtualThread();
-    }
+/**
+ * This class is required by the aws2-grouped module. The group-tests.groovy script copies test sources
+ * from this module into the grouped module and renames all occurrences of Aws2EcsTest to
+ * GroupedAws2EcsTest, which also renames Aws2EcsTestResource to GroupedAws2EcsTestResource
+ * in the @QuarkusTestResource annotation. This class must therefore exist so that the grouped module compiles.

Review Comment:
   I modified the script to avoid change the class name to 'GroupedxxxTestResource' refered by @QuarkusTestResource. Please review it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add AWS 2 ECS integration tests [camel-quarkus]

Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton commented on code in PR #8668:
URL: https://github.com/apache/camel-quarkus/pull/8668#discussion_r3264089925


##########
integration-test-groups/aws2/aws2-ecs/README.adoc:
##########
@@ -0,0 +1,26 @@
+= AWS ECS tests
+
+By default the tests run in WireMock playback mode using pre-recorded mappings from `src/test/resources/mappings/`.

Review Comment:
   Can we add some instructions on how to regenerate the mappings. You can see some examples, if you look at some of the WireMocked integration test READMEs elsewhere in the project.



##########
integration-test-groups/aws2/aws2-ecs/src/test/java/org/apache/camel/quarkus/component/aws2/ecs/it/Aws2EcsTest.java:
##########
@@ -0,0 +1,92 @@
+/*
+ * 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.ecs.it;
+
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.MethodOrderer;
+import org.junit.jupiter.api.Order;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestMethodOrder;
+
+import static org.hamcrest.Matchers.hasItem;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.notNullValue;
+
+@QuarkusTest
+@QuarkusTestResource(Aws2EcsTestResource.class)
+@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
+class Aws2EcsTest {
+
+    static final String CLUSTER_NAME = "cq-test-cluster";
+    static String clusterArn;
+
+    @Test
+    @Order(1)

Review Comment:
   It might be simpler and better for debugging to not use `@Order` and combine things into a single `cluster crud` test (just my opinion), and run the deletion task in a `finally` block. 



##########
integration-test-groups/aws2/aws2-ecs/src/test/java/org/apache/camel/quarkus/component/aws2/ecs/it/GroupedAws2EcsTestResource.java:
##########
@@ -14,19 +14,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.quarkus.component.seda.it;
+package org.apache.camel.quarkus.component.aws2.ecs.it;
 
-import io.quarkus.test.junit.QuarkusIntegrationTest;
-import org.junit.jupiter.api.Test;
-
-@QuarkusIntegrationTest
-class SedaVirtualThreadsIT extends SedaVirtualThreadsTest {
-    /**
-     * Overridden to remove JDK version restrictions as the JDK used in native mode should be >= 25
-     */
-    @Override
-    @Test
-    void sedaExecutesOnVirtualThread() {
-        super.sedaExecutesOnVirtualThread();
-    }
+/**
+ * This class is required by the aws2-grouped module. The group-tests.groovy script copies test sources
+ * from this module into the grouped module and renames all occurrences of Aws2EcsTest to
+ * GroupedAws2EcsTest, which also renames Aws2EcsTestResource to GroupedAws2EcsTestResource
+ * in the @QuarkusTestResource annotation. This class must therefore exist so that the grouped module compiles.

Review Comment:
   ```
   This class must therefore exist so that the grouped module compiles.
   ```
   
   Or we could just make the script smarter to handle that 🙂. It's not 100% required, but if you want to try it, go ahead.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add AWS 2 ECS integration tests [camel-quarkus]

Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton commented on PR #8668:
URL: https://github.com/apache/camel-quarkus/pull/8668#issuecomment-4485051925

   Seems most of the `Aws2Msk` tests failed on the last CI run. Not sure if it's related to these changes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org