You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/08/01 06:39:56 UTC

[GitHub] [camel-quarkus] JiriOndrusek commented on a diff in pull request #3919: Improve google-pubsub test coverage #3910

JiriOndrusek commented on code in PR #3919:
URL: https://github.com/apache/camel-quarkus/pull/3919#discussion_r934184193


##########
integration-tests/google-pubsub/src/test/java/org/apache/camel/quarkus/component/google/pubsub/it/GooglePubsubTest.java:
##########
@@ -56,6 +73,223 @@ public void jacksonSerializer() {
         RestAssured.get("/google-pubsub/pojo")
                 .then()
                 .statusCode(200)
-                .body("name", is(fruitName));
+                .body("name", Matchers.is(fruitName));
+
+    }
+
+    @Test
+    @Order(3)
+    public void testGrouped() throws Exception {
+        RestAssured.given()
+                .queryParam("toEndpoint", GooglePubSubRoutes.GROUP_DIRECT_AGGREGATOR)
+                .body("body1")
+                .post("/google-pubsub/sendToEndpoint")
+                .then()
+                .statusCode(201);
+
+        RestAssured.given()
+                .get("/google-pubsub/receive/subscription/google-pubsub.grouped-subscription-name")
+                .then()
+                .statusCode(204);
+
+        RestAssured.given()
+                .queryParam("toEndpoint", GooglePubSubRoutes.GROUP_DIRECT_AGGREGATOR)
+                .body("body2")
+                .post("/google-pubsub/sendToEndpoint")
+                .then()
+                .statusCode(201);
+
+        Set<String> results = new HashSet<>();
+        results.add(RestAssured.given()
+                .get("/google-pubsub/receive/subscription/google-pubsub.grouped-subscription-name")
+                .then()
+                .statusCode(200).extract().asString());
+
+        results.add(RestAssured.given()
+                .get("/google-pubsub/receive/subscription/google-pubsub.grouped-subscription-name")
+                .then()
+                .statusCode(200).extract().asString());
+
+        Assertions.assertTrue(results.contains("body1"));
+        Assertions.assertTrue(results.contains("body2"));
+
     }
+
+    //Disabled on real account because of https://issues.apache.org/jira/browse/CAMEL-18277
+    @DisabledIfEnvironmentVariable(named = "GOOGLE_APPLICATION_CREDENTIALS", matches = ".+")
+    // https://github.com/apache/camel-quarkus/issues/3944
+    @DisabledIfEnvironmentVariable(named = "CI", matches = "true")

Review Comment:
   `OrderingTest` is disabled on CI. Issue to investoigate further is raised https://github.com/apache/camel-quarkus/issues/3944. PR could be merged.



-- 
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