Skip to content

Commit

Permalink
control-service: better error message (#2094)
Browse files Browse the repository at this point in the history
  • Loading branch information
murphp15 authored May 19, 2023
1 parent a256ba9 commit 646a634
Showing 1 changed file with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,26 @@ public void beforeEach(ExtensionContext context) throws Exception {
.andExpect(status().isAccepted())
.andReturn();

await()
.atMost(120, TimeUnit.SECONDS)
.with()
.pollDelay(20, TimeUnit.SECONDS)
.pollInterval(2, TimeUnit.SECONDS)
.failFast(
() -> {
if (dataJobsKubernetesService
.getPod("builder-" + jobName)
.map(a -> a.getStatus().getPhase().equals("Failed"))
.orElse(false)) {
throw new Exception(dataJobsKubernetesService.getPodLogs("builder-" + jobName));
}
})
.until(() -> dataJobsKubernetesService.getPod("builder-" + jobName).isEmpty());

// Verify that the job deployment was created
String jobDeploymentName = JobImageDeployer.getCronJobName(jobName);
await()
.atMost(360, TimeUnit.SECONDS)
.atMost(240, TimeUnit.SECONDS)
.with()
.pollInterval(10, TimeUnit.SECONDS)
.until(() -> dataJobsKubernetesService.readCronJob(jobDeploymentName).isPresent());
Expand Down

0 comments on commit 646a634

Please sign in to comment.