diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/bulk/BulkDataExportSvcImplR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/bulk/BulkDataExportSvcImplR4Test.java index 2eb16764c3f..da8686ef5df 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/bulk/BulkDataExportSvcImplR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/bulk/BulkDataExportSvcImplR4Test.java @@ -40,6 +40,7 @@ import java.util.Collection; import java.util.Date; import java.util.List; import java.util.UUID; +import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import static org.awaitility.Awaitility.await; @@ -339,8 +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().until(() -> { + await().atMost(120, TimeUnit.SECONDS).until(() -> { JobExecution jobExecution = myJobExplorer.getJobExecution(theJobExecution.getId()); + ourLog.info("JobExecution {} currently has status: {}", theJobExecution.getId(), jobExecution.getStatus()); return jobExecution.getStatus() == BatchStatus.COMPLETED; }); }