RED-9548 - Actions results in wrong results for deadlocked annotation

- fix unit test
This commit is contained in:
corinaolariu 2024-08-29 09:34:26 +03:00
parent a8af78c501
commit 5fdb7d3773

View File

@ -1788,12 +1788,6 @@ public class ManualRedactionTest extends AbstractPersistenceServerServiceTest {
unprocessedManualRedactions = manualRedactionClient.getManualRedactions(dossier.getId(), file.getId(), true, true);
assertEquals(unprocessedManualRedactions.getForceRedactions().size(), 1);
assertFalse(unprocessedManualRedactions.getForceRedactions()
.stream()
.noneMatch(entry -> entry.getAnnotationId().equals("forceRedactionAnnotation")));
assertTrue(unprocessedManualRedactions.getForceRedactions()
.stream()
.anyMatch(entry -> entry.getAnnotationId().equals(forceResponse.getManualAddResponses().get(0).getAnnotationId())));
assertFalse(unprocessedManualRedactions.getForceRedactions()
.stream()
.anyMatch(entry -> entry.getAnnotationId().equals("forceRedactionAnnotation2")));
@ -1813,12 +1807,18 @@ public class ManualRedactionTest extends AbstractPersistenceServerServiceTest {
allManualRedactions = manualRedactionClient.getManualRedactions(dossier.getId(), file.getId(), false, true);
assertEquals(allManualRedactions.getForceRedactions().size(), 2);
assertFalse(allManualRedactions.getForceRedactions()
.stream()
.anyMatch(entry -> entry.getAnnotationId().equals("forceRedactionAnnotation")));
assertTrue(allManualRedactions.getForceRedactions()
.stream()
.anyMatch(entry -> entry.getAnnotationId().equals("forceRedactionAnnotation")));
.anyMatch(entry -> entry.getAnnotationId().equals(forceResponse.getManualAddResponses().get(0).getAnnotationId())));
assertFalse(allManualRedactions.getForceRedactions()
.stream()
.anyMatch(entry -> entry.getAnnotationId().equals("forceRedactionAnnotation2")));
assertTrue(allManualRedactions.getForceRedactions()
.stream()
.anyMatch(entry -> entry.getAnnotationId().equals("forceRedactionAnnotation2")));
.anyMatch(entry -> entry.getAnnotationId().equals(forceResponse2.getManualAddResponses().get(0).getAnnotationId())));
unprocessedManualRedactions = manualRedactionClient.getManualRedactions(dossier.getId(), file.getId(), true, true);
assertTrue(unprocessedManualRedactions.getForceRedactions().isEmpty());