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-apps.git
The following commit(s) were added to refs/heads/main by this push:
new abf762fb9 [kie-issues#1857] Fix added test for MongoDB and Infinispan
(#2213)
abf762fb9 is described below
commit abf762fb9aeb2312c5b2192d988876671c5fcffd
Author: Gonzalo Muñoz <[email protected]>
AuthorDate: Wed Apr 9 15:30:06 2025 +0200
[kie-issues#1857] Fix added test for MongoDB and Infinispan (#2213)
---
.../java/org/kie/kogito/index/AbstractProcessDataIndexIT.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git
a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/test/java/org/kie/kogito/index/AbstractProcessDataIndexIT.java
b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/test/java/org/kie/kogito/index/AbstractProcessDataIndexIT.java
index fcd5a3825..8ebb0cede 100644
---
a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/test/java/org/kie/kogito/index/AbstractProcessDataIndexIT.java
+++
b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/test/java/org/kie/kogito/index/AbstractProcessDataIndexIT.java
@@ -51,6 +51,7 @@ import static org.hamcrest.CoreMatchers.hasItem;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.Matchers.greaterThan;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -300,7 +301,7 @@ public abstract class AbstractProcessDataIndexIT {
await()
.atMost(TIMEOUT)
- .untilAsserted(() -> getProcessInstanceById(pId2, "ACTIVE",
2));
+ .untilAsserted(() -> getProcessInstanceById(pId2, "ACTIVE"));
if (validateGetProcessInstanceSource()) {
await()
@@ -443,7 +444,7 @@ public abstract class AbstractProcessDataIndexIT {
.body("errors", nullValue()));
await()
.atMost(TIMEOUT)
- .untilAsserted(() -> getProcessInstanceById(pId2, "ABORTED",
1));
+ .untilAsserted(() -> getProcessInstanceById(pId2, "ABORTED"));
given().spec(dataIndexSpec()).contentType(ContentType.JSON)
.body("{ \"query\" : \"mutation{ ProcessInstanceRetry( id:
\\\"" + pId2 + "\\\")}\"}")
@@ -699,7 +700,7 @@ public abstract class AbstractProcessDataIndexIT {
.path("id");
}
- protected ValidatableResponse getProcessInstanceById(String
processInstanceId, String state, int numberOfEntries) {
+ protected ValidatableResponse getProcessInstanceById(String
processInstanceId, String state) {
return given().spec(dataIndexSpec()).contentType(ContentType.JSON)
.body("{ \"query\" : \"{ProcessInstances(where: { id: {
equal : \\\"" + processInstanceId + "\\\"}}){ id, processId, state,
executionSummary } }\" }")
.when().post("/graphql")
@@ -708,7 +709,8 @@ public abstract class AbstractProcessDataIndexIT {
.body("data.ProcessInstances[0].id", is(processInstanceId))
.body("data.ProcessInstances[0].processId", is("approvals"))
.body("data.ProcessInstances[0].state", is(state))
- .body("data.ProcessInstances[0].executionSummary.size()",
is(numberOfEntries));
+ .body("data.ProcessInstances[0].executionSummary",
is(notNullValue()))
+ .body("data.ProcessInstances[0].executionSummary.size()",
greaterThan(0));
}
private void checkExpectedCreatedItemData(String creationData, Map<String,
String> resultMap) throws IOException {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]