From b0453fd9538d6858e6bd212f402d4b04c6306136 Mon Sep 17 00:00:00 2001 From: "nathaniel.doef" Date: Wed, 8 Feb 2023 12:39:09 -0500 Subject: [PATCH] add logging --- .../ca/uhn/fhir/jpa/bulk/BulkDataExportTest.java | 9 +++++++-- .../ca/uhn/fhir/jpa/api/model/Batch2JobInfo.java | 13 +++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/bulk/BulkDataExportTest.java b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/bulk/BulkDataExportTest.java index 33c875c8178d..7040ed129dd2 100644 --- a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/bulk/BulkDataExportTest.java +++ b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/bulk/BulkDataExportTest.java @@ -707,16 +707,21 @@ private void verifyBulkExportResults(BulkDataExportOptions theOptions, List theContainedList, List 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(); diff --git a/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/api/model/Batch2JobInfo.java b/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/api/model/Batch2JobInfo.java index 96749be2c002..e6b9261fc668 100644 --- a/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/api/model/Batch2JobInfo.java +++ b/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/api/model/Batch2JobInfo.java @@ -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 + '\'' + + '}'; + } }