From c19d17b7c75988ec742412b273bb61fc6a1c034e Mon Sep 17 00:00:00 2001 From: Tadgh Date: Mon, 14 Nov 2022 18:09:15 -0800 Subject: [PATCH] wip and test --- .../ca/uhn/fhir/jpa/batch2/JpaJobPersistenceImplTest.java | 5 ++--- .../coordinator/SynchronizedJobPersistenceWrapper.java | 5 +++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/batch2/JpaJobPersistenceImplTest.java b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/batch2/JpaJobPersistenceImplTest.java index 8de597a1719..5921e6f5d9b 100644 --- a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/batch2/JpaJobPersistenceImplTest.java +++ b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/batch2/JpaJobPersistenceImplTest.java @@ -315,13 +315,12 @@ public class JpaJobPersistenceImplTest extends BaseJpaR4Test { // Execute - mySvc.canAdvanceInstanceToNextStep(instanceId, STEP_CHUNK_ID); + boolean b = mySvc.canAdvanceInstanceToNextStep(instanceId, STEP_CHUNK_ID); // Verify List chunks = mySvc.fetchWorkChunksWithoutData(instanceId, 100, 0); - assertEquals(1, chunks.size()); - assertEquals(5, chunks.get(0).getErrorCount()); + assertEquals(b, true); } diff --git a/hapi-fhir-storage-batch2/src/main/java/ca/uhn/fhir/batch2/coordinator/SynchronizedJobPersistenceWrapper.java b/hapi-fhir-storage-batch2/src/main/java/ca/uhn/fhir/batch2/coordinator/SynchronizedJobPersistenceWrapper.java index ba9595f14b2..3fc6934bdf9 100644 --- a/hapi-fhir-storage-batch2/src/main/java/ca/uhn/fhir/batch2/coordinator/SynchronizedJobPersistenceWrapper.java +++ b/hapi-fhir-storage-batch2/src/main/java/ca/uhn/fhir/batch2/coordinator/SynchronizedJobPersistenceWrapper.java @@ -126,6 +126,11 @@ public class SynchronizedJobPersistenceWrapper implements IJobPersistence { myWrap.incrementWorkChunkErrorCount(theChunkId, theIncrementBy); } + @Override + public boolean canAdvanceInstanceToNextStep(String theInstanceId, String theCurrentStepId) { + return myWrap.canAdvanceInstanceToNextStep(theInstanceId, theCurrentStepId); + } + @Override public synchronized List fetchWorkChunksWithoutData(String theInstanceId, int thePageSize, int thePageIndex) { return myWrap.fetchWorkChunksWithoutData(theInstanceId, thePageSize, thePageIndex);