Merge remote-tracking branch 'origin/spring-batch-integration' into spring-batch-integration

This commit is contained in:
Ken Stevens 2020-06-25 15:27:46 -04:00
commit 7322760f5d
3 changed files with 11 additions and 15 deletions

View File

@ -304,7 +304,6 @@ public class BulkDataExportSvcImplR4Test extends BaseJpaR4Test {
assertEquals(jobDetails1.getJobId(), jobDetails2.getJobId());
}
@Test
public void testBatchJobSubmitsAndRuns() throws Exception {
createResources();
@ -340,11 +339,7 @@ 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(() -> {
return theJobExecution.getStatus() == BatchStatus.COMPLETED;
//String jobUUID = theJobExecution.getExecutionContext().getString("jobUUID");
//return myBulkDataExportSvc.getJobInfoOrThrowResourceNotFound(jobUUID).getStatus() == BulkJobStatusEnum.COMPLETE;
});
await().until(() -> theJobExecution.getStatus() == BatchStatus.COMPLETED);
}
@Test

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

@ -108,7 +108,7 @@ public class EmpiPersonMergerSvcTest extends BaseEmpiR4Test {
@Test
public void mergeRemovesPossibleDuplicatesLink() {
EmpiLink empiLink = new EmpiLink().setPersonPid(myToPersonPid).setTargetPid(myFromPersonPid).setMatchResult(EmpiMatchResultEnum.POSSIBLE_DUPLICATE).setLinkSource(EmpiLinkSourceEnum.AUTO);
myEmpiLinkDaoSvc.save(empiLink);
saveLink(empiLink);
assertEquals(1, myEmpiLinkDao.count());
mergePersons();
assertEquals(0, myEmpiLinkDao.count());
@ -179,7 +179,8 @@ public class EmpiPersonMergerSvcTest extends BaseEmpiR4Test {
EmpiLink fromLink = createEmpiLink(myFromPerson, myTargetPatient1);
fromLink.setLinkSource(EmpiLinkSourceEnum.MANUAL);
fromLink.setMatchResult(EmpiMatchResultEnum.NO_MATCH);
myEmpiLinkDaoSvc.save(fromLink);
saveLink(fromLink);
createEmpiLink(myToPerson, myTargetPatient1);
@ -196,7 +197,7 @@ public class EmpiPersonMergerSvcTest extends BaseEmpiR4Test {
EmpiLink toLink = createEmpiLink(myToPerson, myTargetPatient1);
toLink.setLinkSource(EmpiLinkSourceEnum.MANUAL);
toLink.setMatchResult(EmpiMatchResultEnum.NO_MATCH);
myEmpiLinkDaoSvc.save(toLink);
saveLink(toLink);
mergePersons();
List<EmpiLink> links = myEmpiLinkDaoSvc.findEmpiLinksByPersonId(myToPerson);
@ -209,7 +210,7 @@ public class EmpiPersonMergerSvcTest extends BaseEmpiR4Test {
EmpiLink fromLink = createEmpiLink(myFromPerson, myTargetPatient1);
fromLink.setLinkSource(EmpiLinkSourceEnum.MANUAL);
fromLink.setMatchResult(EmpiMatchResultEnum.NO_MATCH);
myEmpiLinkDaoSvc.save(fromLink);
saveLink(fromLink);
EmpiLink toLink = createEmpiLink(myToPerson, myTargetPatient1);
toLink.setLinkSource(EmpiLinkSourceEnum.MANUAL);
@ -229,12 +230,12 @@ public class EmpiPersonMergerSvcTest extends BaseEmpiR4Test {
EmpiLink fromLink = createEmpiLink(myFromPerson, myTargetPatient1);
fromLink.setLinkSource(EmpiLinkSourceEnum.MANUAL);
fromLink.setMatchResult(EmpiMatchResultEnum.MATCH);
myEmpiLinkDaoSvc.save(fromLink);
saveLink(fromLink);
EmpiLink toLink = createEmpiLink(myToPerson, myTargetPatient1);
toLink.setLinkSource(EmpiLinkSourceEnum.MANUAL);
toLink.setMatchResult(EmpiMatchResultEnum.NO_MATCH);
myEmpiLinkDaoSvc.save(toLink);
saveLink(toLink);
try {
mergePersons();
@ -249,12 +250,12 @@ public class EmpiPersonMergerSvcTest extends BaseEmpiR4Test {
EmpiLink fromLink = createEmpiLink(myFromPerson, myTargetPatient1);
fromLink.setLinkSource(EmpiLinkSourceEnum.MANUAL);
fromLink.setMatchResult(EmpiMatchResultEnum.NO_MATCH);
myEmpiLinkDaoSvc.save(fromLink);
saveLink(fromLink);
EmpiLink toLink = createEmpiLink(myToPerson, myTargetPatient2);
toLink.setLinkSource(EmpiLinkSourceEnum.MANUAL);
toLink.setMatchResult(EmpiMatchResultEnum.MATCH);
myEmpiLinkDaoSvc.save(toLink);
saveLink(toLink);
mergePersons();
assertEquals(1, myToPerson.getLink().size());