Skip to content

Commit

Permalink
add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandoef committed Feb 8, 2023
1 parent bbc7418 commit b0453fd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -707,16 +707,21 @@ private void verifyBulkExportResults(BulkDataExportOptions theOptions, List<Stri
// 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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,17 @@ public String getErrorMsg() {
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 + '\'' +
'}';
}
}

0 comments on commit b0453fd

Please sign in to comment.