Skip to content

Commit 3d96223

Browse files
Refactor SpotlightBatchServiceTest to prevent re-queuing of GGIS_ERROR submissions, ensuring they require manual intervention.
1 parent fe6ae16 commit 3d96223

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/test/java/gov/cabinetoffice/gap/adminbackend/services/SpotlightBatchServiceTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,6 @@ void spotlightResponsesResultIsNotNullAndDraftAssessmentStatusIsFailureAndMessag
722722

723723
doNothing().when(spotlightBatchService).updateSpotlightBatchStatus(sendToSpotlightDto,
724724
SpotlightBatchStatus.FAILURE);
725-
doNothing().when(spotlightBatchService).sendMessageToQueue(spotlightSubmission);
726725

727726
spotlightBatchService.processSpotlightResponse(sendToSpotlightDto, spotlightResponseResults);
728727

@@ -733,7 +732,8 @@ void spotlightResponsesResultIsNotNullAndDraftAssessmentStatusIsFailureAndMessag
733732

734733
verify(spotlightBatchService, times(1)).updateSpotlightBatchStatus(sendToSpotlightDto,
735734
SpotlightBatchStatus.FAILURE);
736-
verify(spotlightBatchService, times(1)).sendMessageToQueue(spotlightSubmission);
735+
// GGIS_ERROR submissions should NOT be re-queued - they require manual intervention
736+
verify(spotlightBatchService, never()).sendMessageToQueue(any());
737737
}
738738

739739
@Test

0 commit comments

Comments
 (0)