fjtirado commented on code in PR #2184:
URL:
https://github.com/apache/incubator-kie-kogito-apps/pull/2184#discussion_r1942775518
##########
apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/KafkaBaseSwitchStateTimeoutsIT.java:
##########
@@ -44,6 +48,18 @@ void cleanUp() {
kafkaClient.shutdown();
}
+ private static JsonPath waitForEvent(KafkaTestClient kafkaClient, String
topic, long seconds) throws Exception {
+ final CountDownLatch countDownLatch = new CountDownLatch(1);
+ final AtomicReference<String> cloudEvent = new AtomicReference<>();
+ kafkaClient.consume(topic, rawCloudEvent -> {
+ cloudEvent.set(rawCloudEvent);
+ countDownLatch.countDown();
+ });
+ // give some time to consume the event.
+ assertThat(countDownLatch.await(seconds, TimeUnit.SECONDS)).isTrue();
+ return new JsonPath(cloudEvent.get());
+ }
+
Review Comment:
TBH, the fix consisting on moving stuff around (a trending topic these days)
to avoid dependency. I do not think we should enter into the logic of what is
being moved.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]