JiriOndrusek commented on code in PR #3919: URL: https://github.com/apache/camel-quarkus/pull/3919#discussion_r942232240
########## integration-tests/google-pubsub/src/test/java/org/apache/camel/quarkus/component/google/pubsub/it/GooglePubsubTest.java: ########## @@ -56,6 +74,219 @@ 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") + @Test + @Order(4) + public void testOrdering() throws Exception { + LOG.info("Start of the ordering test"); + RestAssured.given() + .queryParam("toEndpoint", GooglePubSubRoutes.ORDERING_DIRECT_IN) + .body("1") + .post("/google-pubsub/sendToEndpoint") + .then() + .statusCode(201); + RestAssured.given() + .queryParam("toEndpoint", GooglePubSubRoutes.ORDERING_DIRECT_IN) + .body("2") + .post("/google-pubsub/sendToEndpoint") + .then() + .statusCode(201); + RestAssured.given() + .queryParam("toEndpoint", GooglePubSubRoutes.ORDERING_DIRECT_IN) + .body("3") + .post("/google-pubsub/sendToEndpoint") + .then() + .statusCode(201); + RestAssured.given() + .queryParam("toEndpoint", GooglePubSubRoutes.ORDERING_DIRECT_IN) + .body("4") + .post("/google-pubsub/sendToEndpoint") + .then() + .statusCode(201); + RestAssured.given() + .queryParam("toEndpoint", GooglePubSubRoutes.ORDERING_DIRECT_IN) + .body("5") + .post("/google-pubsub/sendToEndpoint") + .then() + .statusCode(201); + RestAssured.given() + .queryParam("toEndpoint", GooglePubSubRoutes.ORDERING_DIRECT_IN) + .body("6") + .post("/google-pubsub/sendToEndpoint") + .then() + .statusCode(201); + LOG.info("All messages were sent"); + + await().atMost(5, TimeUnit.SECONDS).until(() -> RestAssured.given() + .get("/google-pubsub/receive/subscriptionOrdering/google-pubsub.ordering-subscription-name") + .then() + .statusCode(200) Review Comment: Yes, duplicated status are there by mistake. Removed. -- 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-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org