Tidy logging, increase timeout to 120 because clocks
This commit is contained in:
parent
a84a41643d
commit
d09f410b4d
|
@ -49,10 +49,8 @@ public class BulkExportJobCloser implements Tasklet {
|
|||
@Override
|
||||
public RepeatStatus execute(StepContribution theStepContribution, ChunkContext theChunkContext) throws Exception {
|
||||
if (theChunkContext.getStepContext().getStepExecution().getJobExecution().getStatus() == BatchStatus.STARTED) {
|
||||
ourLog.warn("Job Closer is setting job to COMPLETE!");
|
||||
myBulkExportDaoSvc.setJobToStatus(myJobUUID, BulkJobStatusEnum.COMPLETE);
|
||||
} else {
|
||||
ourLog.error("Job Closer is setting job to ERROR!");
|
||||
myBulkExportDaoSvc.setJobToStatus(myJobUUID, BulkJobStatusEnum.ERROR);
|
||||
}
|
||||
return RepeatStatus.FINISHED;
|
||||
|
|
|
@ -340,10 +340,9 @@ public class BulkDataExportSvcImplR4Test extends BaseJpaR4Test {
|
|||
//Note that if the job is generated, and doesnt rely on an existed persisted BulkExportJobEntity, it will need to
|
||||
//create one itself, which means that its jobUUID isnt known until it starts. to get around this, we move
|
||||
public void awaitJobCompletion(JobExecution theJobExecution) throws InterruptedException {
|
||||
await().atMost(100, TimeUnit.SECONDS).until(() -> {
|
||||
ourLog.warn("Checking to see if jobExecution {} is finished", theJobExecution.getId());
|
||||
await().atMost(120, TimeUnit.SECONDS).until(() -> {
|
||||
JobExecution jobExecution = myJobExplorer.getJobExecution(theJobExecution.getId());
|
||||
ourLog.warn("That jobExecution currently has status: {}", jobExecution.getStatus());
|
||||
ourLog.info("JobExecution {} currently has status: {}", theJobExecution.getId(), jobExecution.getStatus());
|
||||
return jobExecution.getStatus() == BatchStatus.COMPLETED;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue