This is an automated email from the ASF dual-hosted git repository.
fjtiradosarti pushed a commit to branch main
in repository
https://gitbox.apache.org/repos/asf/incubator-kie-kogito-examples.git
The following commit(s) were added to refs/heads/main by this push:
new eeec404b4 [Fixes_#2076]CallbackRestIT fails in native mode due to a
race condition (#2077)
eeec404b4 is described below
commit eeec404b40dde25de0096035ad907b2b566caeef
Author: Gonzalo Muñoz <[email protected]>
AuthorDate: Mon Feb 24 17:13:34 2025 +0100
[Fixes_#2076]CallbackRestIT fails in native mode due to a race condition
(#2077)
---
.../serverless-workflow-callback-quarkus/pom.xml | 4 ++++
.../test/java/org/kie/kogito/examples/CallbackRestIT.java | 15 ++++++++++++++-
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git
a/serverless-workflow-examples/serverless-workflow-callback-quarkus/pom.xml
b/serverless-workflow-examples/serverless-workflow-callback-quarkus/pom.xml
index 8482f382b..a232de231 100644
--- a/serverless-workflow-examples/serverless-workflow-callback-quarkus/pom.xml
+++ b/serverless-workflow-examples/serverless-workflow-callback-quarkus/pom.xml
@@ -122,6 +122,10 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-agroal</artifactId>
</dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-smallrye-health</artifactId>
+ </dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
diff --git
a/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/test/java/org/kie/kogito/examples/CallbackRestIT.java
b/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/test/java/org/kie/kogito/examples/CallbackRestIT.java
index a8930aa60..fe4fdaac5 100644
---
a/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/test/java/org/kie/kogito/examples/CallbackRestIT.java
+++
b/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/test/java/org/kie/kogito/examples/CallbackRestIT.java
@@ -19,6 +19,7 @@
package org.kie.kogito.examples;
import static io.restassured.RestAssured.given;
+import static java.util.concurrent.TimeUnit.MINUTES;
import static java.util.concurrent.TimeUnit.SECONDS;
import static org.awaitility.Awaitility.await;
@@ -36,7 +37,19 @@ class CallbackRestIT {
@Test
void testCallbackRest() {
- String id = given()
+ await()
+ .atMost(2, MINUTES)
+ .pollDelay(2, SECONDS)
+ .pollInterval(1, SECONDS)
+ .untilAsserted(() -> {
+ given()
+ .contentType(ContentType.JSON)
+ .accept(ContentType.JSON)
+ .get("/q/health")
+ .then()
+ .statusCode(200);
+ });
+ String id = given()
.contentType(ContentType.JSON)
.accept(ContentType.JSON)
.post("/callback")
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]