This commit is contained in:
Tadgh 2020-06-25 10:37:02 -07:00
parent 1d9641a736
commit ed155e7657
3 changed files with 4 additions and 5 deletions

View File

@ -25,6 +25,7 @@ import org.hl7.fhir.r4.model.Patient;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.batch.core.BatchStatus;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobInstance;
@ -340,9 +341,7 @@ public class BulkDataExportSvcImplR4Test extends BaseJpaR4Test {
//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(() -> {
//return theJobExecution.getStatus() == BatchStatus.COMPLETED;
String jobUUID = theJobExecution.getExecutionContext().getString("jobUUID");
return myBulkDataExportSvc.getJobInfoOrThrowResourceNotFound(jobUUID).getStatus() == BulkJobStatusEnum.COMPLETE;
return theJobExecution.getStatus() == BatchStatus.COMPLETED;
});
}

View File

@ -44,7 +44,7 @@ public class TestR4Config extends BaseJavaConfigR4 {
* starvation
*/
if (ourMaxThreads == null) {
ourMaxThreads = (int) (Math.random() * 6.0) + 2;
ourMaxThreads = (int) (Math.random() * 6.0) + 3;
if ("true".equals(System.getProperty("single_db_connection"))) {
ourMaxThreads = 1;

View File

@ -45,7 +45,7 @@ public class TestJpaConfig {
@Bean
@Primary
public JpaTransactionManager hapiransactionManager(EntityManagerFactory entityManagerFactory) {
public JpaTransactionManager hapiTransactionManager(EntityManagerFactory entityManagerFactory) {
JpaTransactionManager retVal = new JpaTransactionManager();
retVal.setEntityManagerFactory(entityManagerFactory);
return retVal;