Skip to content

Commit

Permalink
KOGITO-9387 - Make retry to check Data Index data (#1700) (#1701)
Browse files Browse the repository at this point in the history
Co-authored-by: Cristiano Nicolai <[email protected]>
  • Loading branch information
github-actions[bot] and cristianonicolai committed Jun 21, 2023
1 parent 704f86c commit f2eac8e
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 f2eac8e

Please sign in to comment.