review poitns finished

This commit is contained in:
leif stawnyczy 2024-03-12 10:25:58 -04:00
parent b3dcc17ccb
commit 88a916ece5
2 changed files with 5 additions and 1 deletions

View File

@ -297,7 +297,9 @@ public class JpaJobPersistenceImpl implements IJobPersistence {
public void enqueueWorkChunkForProcessing(String theChunkId, Consumer<Integer> theCallback) {
int updated = myWorkChunkRepository.updateChunkStatus(
theChunkId, WorkChunkStatusEnum.QUEUED, WorkChunkStatusEnum.READY);
theCallback.accept(updated);
if (updated == 1) {
theCallback.accept(updated);
}
}
@Override

View File

@ -55,6 +55,7 @@ import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
@ -476,6 +477,7 @@ public class JobCoordinatorImplTest extends BaseBatch2Test {
assertSame(jobDefinition, myJobDefinitionCaptor.getValue());
assertEquals(startRequest.getParameters(), myParametersJsonCaptor.getValue());
verify(myBatchJobSender, never()).sendWorkChannelMessage(any());
verifyNoMoreInteractions(myJobInstancePersister);
verifyNoMoreInteractions(myStep1Worker);
verifyNoMoreInteractions(myStep2Worker);