From 2248fe880334ed50d341ab36c6e46a5763c223aa Mon Sep 17 00:00:00 2001 From: Rishiraj Anand Date: Tue, 3 Dec 2024 12:41:54 +0530 Subject: [PATCH] fixing test failure with smallrye-reactive-messaging --- build-parent/pom.xml | 6 +++--- .../drools-quarkus-examples-reactive/pom.xml | 8 +++++++- .../quarkus/ruleunit/examples/reactive/RuntimeTest.java | 6 ++++++ drools-reliability/drools-reliability-tests/pom.xml | 2 +- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/build-parent/pom.xml b/build-parent/pom.xml index 52fc0da46bd..4222adc0616 100644 --- a/build-parent/pom.xml +++ b/build-parent/pom.xml @@ -67,9 +67,9 @@ 3.7.4 1.0.1 3.25.5 - 2.2.220 + 2.3.232 1.0.86 - 4.0.4 + 4.0.5 1.4.21 0.18.0 4.7.5 @@ -191,7 +191,7 @@ 1.14.11 - 42.7.2 + 42.7.4 2.0.1 3.2.2 diff --git a/drools-quarkus-extension/drools-quarkus-examples/drools-quarkus-examples-reactive/pom.xml b/drools-quarkus-extension/drools-quarkus-examples/drools-quarkus-examples-reactive/pom.xml index 7408ab126de..0a35b71415c 100644 --- a/drools-quarkus-extension/drools-quarkus-examples/drools-quarkus-examples-reactive/pom.xml +++ b/drools-quarkus-extension/drools-quarkus-examples/drools-quarkus-examples-reactive/pom.xml @@ -51,7 +51,7 @@ io.quarkus - quarkus-smallrye-reactive-messaging-kafka + quarkus-messaging-kafka org.assertj @@ -78,6 +78,12 @@ test + + org.awaitility + awaitility + test + + diff --git a/drools-quarkus-extension/drools-quarkus-examples/drools-quarkus-examples-reactive/src/test/java/org/drools/quarkus/ruleunit/examples/reactive/RuntimeTest.java b/drools-quarkus-extension/drools-quarkus-examples/drools-quarkus-examples-reactive/src/test/java/org/drools/quarkus/ruleunit/examples/reactive/RuntimeTest.java index 9771b03d800..b16873e510e 100644 --- a/drools-quarkus-extension/drools-quarkus-examples/drools-quarkus-examples-reactive/src/test/java/org/drools/quarkus/ruleunit/examples/reactive/RuntimeTest.java +++ b/drools-quarkus-extension/drools-quarkus-examples/drools-quarkus-examples-reactive/src/test/java/org/drools/quarkus/ruleunit/examples/reactive/RuntimeTest.java @@ -25,9 +25,14 @@ import io.smallrye.reactive.messaging.memory.InMemoryConnector; import io.smallrye.reactive.messaging.memory.InMemorySink; import io.smallrye.reactive.messaging.memory.InMemorySource; +import org.eclipse.microprofile.reactive.messaging.Message; import org.eclipse.microprofile.reactive.messaging.spi.Connector; import org.junit.jupiter.api.Test; +import java.util.List; + +import static org.awaitility.Awaitility.await; + import static org.assertj.core.api.Assertions.assertThat; @QuarkusTest @@ -46,6 +51,7 @@ public void sendEvents() { incomingEvents.send(new Event("temperature", 20)); incomingEvents.send(new Event("temperature", 40)); + await().>>until(outgoingAlerts::received, t -> t.size() == 1); assertThat(outgoingAlerts.received().size()).isEqualTo(1); assertThat(outgoingAlerts.received().get(0).getPayload().getSeverity()).isEqualTo("warning"); diff --git a/drools-reliability/drools-reliability-tests/pom.xml b/drools-reliability/drools-reliability-tests/pom.xml index c441f6d4e09..da896f97158 100644 --- a/drools-reliability/drools-reliability-tests/pom.xml +++ b/drools-reliability/drools-reliability-tests/pom.xml @@ -35,7 +35,7 @@ org.drools.reliability.infinispan - 1.17.2 + 1.20.1