Skip to content

Commit

Permalink
KOGITO-9387 - Make retry to check Data Index data (#1700)
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianonicolai authored Jun 21, 2023
1 parent 384cc1c commit 3fcd989
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,15 @@ void testDataIndexRest() {
.then()
.statusCode(404));

given().contentType(ContentType.JSON).body("{ \"query\" : \"{ ProcessInstances(where: { id: {equal: \\\"" + processInstanceId + "\\\"}}) { id, state } }\" }")
.when().post("/graphql")
.then().statusCode(200)
.body("data.ProcessInstances.size()", is(1))
.body("data.ProcessInstances[0].id", is(processInstanceId))
.body("data.ProcessInstances[0].state", is("COMPLETED"));
await()
.atLeast(1, SECONDS)
.atMost(30, SECONDS)
.with().pollInterval(1, SECONDS)
.untilAsserted(() -> given().contentType(ContentType.JSON).body("{ \"query\" : \"{ ProcessInstances(where: { id: {equal: \\\"" + processInstanceId + "\\\"}}) { id, state } }\" }")
.when().post("/graphql")
.then().statusCode(200)
.body("data.ProcessInstances.size()", is(1))
.body("data.ProcessInstances[0].id", is(processInstanceId))
.body("data.ProcessInstances[0].state", is("COMPLETED")));
}
}

0 comments on commit 3fcd989

Please sign in to comment.