Skip to content

Commit

Permalink
chore(testing):[#226] fix cucumber batch id step
Browse files Browse the repository at this point in the history
  • Loading branch information
ds-jhartmann committed Jul 26, 2024
1 parent d25049c commit 0eb660f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,11 @@ public void iGetTheBatchIdOfBatch(String which) {

@When("I get the {string} job-id from batch")
public void iGetTheJobIdFromBatch(String which) {
await().atMost(30, TimeUnit.SECONDS)
.with()
.pollInterval(Duration.ofSeconds(5L))
.until(() -> !batchResponse.getJobs().isEmpty());

final UUID foundJobId = switch (which) {
case "first" -> batchResponse.getJobs().get(0).getId();
case "any" -> batchResponse.getJobs().stream().findAny().map(JobStatusResult::getId).orElseThrow();
Expand Down

0 comments on commit 0eb660f

Please sign in to comment.