add logging

This commit is contained in:
nathaniel.doef 2023-02-08 12:39:09 -05:00
parent bbc7418d51
commit b0453fd953
2 changed files with 20 additions and 2 deletions

View File

@ -707,16 +707,21 @@ public class BulkDataExportTest extends BaseResourceProviderR4Test {
// Run a scheduled pass to build the export
myBatch2JobHelper.awaitJobCompletion(startResponse.getJobId());
System.out.println("ND-AFTER-COMPLETE: " + myJobRunner.getJobInfo(startResponse.getJobId()));
verifyReport(theContainedList, theExcludedList, startResponse);
}
private void verifyReport(List<String> theContainedList, List<String> theExcludedList, Batch2JobStartResponse theStartResponse) {
myJobMaintenanceService.triggerMaintenancePass();
// myJobMaintenanceService.triggerMaintenancePass();
await()
.atMost(300, TimeUnit.SECONDS)
.until(() -> myJobRunner.getJobInfo(theStartResponse.getJobId()).getReport() != null);
.until(() -> {
System.out.println("ND-INSIDE-AWAIT: " + myJobRunner.getJobInfo(theStartResponse.getJobId()));
Thread.sleep(1000);
return myJobRunner.getJobInfo(theStartResponse.getJobId()).getReport() != null;
});
// Iterate over the files
String report = myJobRunner.getJobInfo(theStartResponse.getJobId()).getReport();

View File

@ -102,4 +102,17 @@ public class Batch2JobInfo {
public void setErrorMsg(String theErrorMsg) {
myErrorMsg = theErrorMsg;
}
@Override
public String toString() {
return "Batch2JobInfo{" +
"myJobId='" + myJobId + '\'' +
", myStatus=" + myStatus +
", myCancelled=" + myCancelled +
", myStartTime=" + myStartTime +
", myEndTime=" + myEndTime +
", myErrorMsg='" + myErrorMsg + '\'' +
", myReport='" + myReport + '\'' +
'}';
}
}