maintenance pass

This commit is contained in:
nathaniel.doef 2023-02-08 02:19:34 -05:00
parent 70f49a2e6f
commit bbc7418d51
1 changed files with 7 additions and 0 deletions

View File

@ -1,5 +1,6 @@
package ca.uhn.fhir.jpa.bulk;
import ca.uhn.fhir.batch2.api.IJobMaintenanceService;
import ca.uhn.fhir.jpa.api.config.DaoConfig;
import ca.uhn.fhir.jpa.api.model.BulkExportJobResults;
import ca.uhn.fhir.jpa.api.svc.IBatch2JobRunner;
@ -74,6 +75,9 @@ public class BulkDataExportTest extends BaseResourceProviderR4Test {
@Autowired
private IBatch2JobRunner myJobRunner;
@Autowired
private IJobMaintenanceService myJobMaintenanceService;
@AfterEach
void afterEach() {
myDaoConfig.setIndexMissingFields(DaoConfig.IndexEnabledEnum.DISABLED);
@ -707,6 +711,9 @@ public class BulkDataExportTest extends BaseResourceProviderR4Test {
}
private void verifyReport(List<String> theContainedList, List<String> theExcludedList, Batch2JobStartResponse theStartResponse) {
myJobMaintenanceService.triggerMaintenancePass();
await()
.atMost(300, TimeUnit.SECONDS)
.until(() -> myJobRunner.getJobInfo(theStartResponse.getJobId()).getReport() != null);