This commit is contained in:
Michael Buckley 2023-02-10 17:13:25 -05:00
parent d7c7a9047b
commit 047498549b
3 changed files with 7 additions and 4 deletions

View File

@ -117,7 +117,7 @@ public class BulkDataErrorAbuseTest extends BaseResourceProviderR4Test {
verifyBulkExportResults(jobId, List.of("Patient/PING1", "Patient/PING2"), Collections.singletonList("Patient/PNING3"));
} catch (Throwable theError) {
ourLog.error("Winner winner! {}", jobId, theError);
ourLog.error("Winner winner! {} {}", jobId, theError.getMessage(), theError);
if (myRunningFlag.get()) {
// something bad happened
// shutdown the pool
@ -147,7 +147,7 @@ public class BulkDataErrorAbuseTest extends BaseResourceProviderR4Test {
String report = myJobRunner.getJobInfo(theJobId).getReport();
ourLog.debug("Export job {} report: {}", theJobId, report);
if (!theContainedList.isEmpty()) {
assertThat(report, not(emptyOrNullString()));
assertThat("report not empty", report, not(emptyOrNullString()));
}
BulkExportJobResults results = JsonUtil.deserialize(report, BulkExportJobResults.class);
@ -185,10 +185,10 @@ public class BulkDataErrorAbuseTest extends BaseResourceProviderR4Test {
ourLog.debug("Export job {} exported resources {}", theJobId, foundIds);
for (String containedString : theContainedList) {
assertThat(foundIds, hasItem(containedString));
assertThat("export has expected ids",foundIds, hasItem(containedString));
}
for (String excludedString : theExcludedList) {
assertThat(foundIds, not(hasItem(excludedString)));
assertThat("export doesn't have expected ids", foundIds, not(hasItem(excludedString)));
}
}

View File

@ -44,5 +44,6 @@
<logger name="org.hibernate.search.backend.lucene.infostream" level="TRACE"/> -->
<logger name="ca.uhn.fhir.jpa.bulk" level="TRACE"/>
<logger name="ca.uhn.fhir.batch2" level="TRACE"/>
</configuration>

View File

@ -203,6 +203,7 @@ public class JobMaintenanceServiceImpl implements IJobMaintenanceService, IHasSc
}
private void doMaintenancePass() {
ourLog.debug("doMaintenancePass() - starting");
myMaintenanceJobStartedCallback.run();
Set<String> processedInstanceIds = new HashSet<>();
JobChunkProgressAccumulator progressAccumulator = new JobChunkProgressAccumulator();
@ -224,6 +225,7 @@ public class JobMaintenanceServiceImpl implements IJobMaintenanceService, IHasSc
}
}
myMaintenanceJobFinishedCallback.run();
ourLog.debug("doMaintenancePass() - finished");
}
public void setMaintenanceJobStartedCallback(Runnable theMaintenanceJobStartedCallback) {