gmunozfe commented on code in PR #2236:
URL:
https://github.com/apache/incubator-kie-kogito-apps/pull/2236#discussion_r2158280676
##########
apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/JobRecipientMock.java:
##########
@@ -85,12 +98,21 @@ public void inject(Object testInstance) {
}
}
- public static void verifyJobWasExecuted(WireMockServer jobRecipient,
String jobId, int limit) {
+ public static void verifyJobWasExecuted(WireMockServer jobRecipient, int
waitAtMostInSeconds, String jobId, int limit) {
await()
- .atMost(600, SECONDS)
+ .atMost(waitAtMostInSeconds, SECONDS)
.with().pollInterval(1, SECONDS)
.untilAsserted(() -> jobRecipient.verify(1,
postRequestedFor(urlEqualTo("/" + JOB_RECIPIENT_MOCK +
"?limit=" + limit))
.withHeader("jobId", equalTo(jobId))));
}
+
+ public static void verifyFailingJobWasExecutedAtLeastCount(WireMockServer
jobRecipient, int waitAtMostInSeconds, int atLeastCount, String jobId, int
limit) {
+ await()
+ .atMost(waitAtMostInSeconds, SECONDS)
+ .with().pollInterval(1, SECONDS)
+ .untilAsserted(() -> jobRecipient.verify(new
CountMatchingStrategy(GREATER_THAN_OR_EQUAL, atLeastCount),
+ postRequestedFor(urlEqualTo("/" +
FAILING_JOB_RECIPIENT_MOCK + "?limit=" + limit))
Review Comment:
`?limit=` could be converted into a constant, as it's used in several
_verify_ methods, but just a suggestion.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]