RED-9246: Resize on dossier level for dossier-template-level entry becomes skipped
* fixed failing tests due to cross modification of dictionary entries depending on test execution order
This commit is contained in:
parent
13363acc83
commit
0676964ae0
@ -206,6 +206,7 @@ public class DocumineFloraTest extends AbstractRedactionIntegrationTest {
|
|||||||
when(rulesClient.getVersion(TEST_DOSSIER_TEMPLATE_ID, RuleFileType.COMPONENT)).thenReturn(System.currentTimeMillis());
|
when(rulesClient.getVersion(TEST_DOSSIER_TEMPLATE_ID, RuleFileType.COMPONENT)).thenReturn(System.currentTimeMillis());
|
||||||
when(rulesClient.getRules(TEST_DOSSIER_TEMPLATE_ID, RuleFileType.COMPONENT)).thenReturn(JSONPrimitive.of(COMPONENT_RULES));
|
when(rulesClient.getRules(TEST_DOSSIER_TEMPLATE_ID, RuleFileType.COMPONENT)).thenReturn(JSONPrimitive.of(COMPONENT_RULES));
|
||||||
|
|
||||||
|
loadDictionaryForTest();
|
||||||
loadTypeForTest();
|
loadTypeForTest();
|
||||||
loadNerForTest();
|
loadNerForTest();
|
||||||
when(dictionaryClient.getVersion(TEST_DOSSIER_TEMPLATE_ID)).thenReturn(0L);
|
when(dictionaryClient.getVersion(TEST_DOSSIER_TEMPLATE_ID)).thenReturn(0L);
|
||||||
|
|||||||
@ -548,6 +548,7 @@ public class RedactionIntegrationTest extends RulesIntegrationTest {
|
|||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@Order(2)
|
||||||
public void testChangeComputation() throws IOException {
|
public void testChangeComputation() throws IOException {
|
||||||
|
|
||||||
String fileName = "files/syngenta/CustomerFiles/SinglePages/test1S1T1.pdf";
|
String fileName = "files/syngenta/CustomerFiles/SinglePages/test1S1T1.pdf";
|
||||||
@ -558,15 +559,15 @@ public class RedactionIntegrationTest extends RulesIntegrationTest {
|
|||||||
analyzeDocumentStructure(LayoutParsingType.REDACT_MANAGER, request);
|
analyzeDocumentStructure(LayoutParsingType.REDACT_MANAGER, request);
|
||||||
analyzeService.analyze(request);
|
analyzeService.analyze(request);
|
||||||
|
|
||||||
dictionary.get(DICTIONARY_AUTHOR).add("report");
|
dictionary.get(DICTIONARY_AUTHOR).add("EFSA conclusion");
|
||||||
reanlysisVersions.put("report", 2L);
|
reanlysisVersions.put("EFSA conclusion", 2L);
|
||||||
when(dictionaryClient.getVersion(TEST_DOSSIER_TEMPLATE_ID)).thenReturn(2L);
|
when(dictionaryClient.getVersion(TEST_DOSSIER_TEMPLATE_ID)).thenReturn(2L);
|
||||||
mockDictionaryCalls(0L);
|
mockDictionaryCalls(0L);
|
||||||
|
|
||||||
analyzeService.reanalyze(request);
|
analyzeService.reanalyze(request);
|
||||||
|
|
||||||
dictionary.get(DICTIONARY_AUTHOR).add("assessment report");
|
dictionary.get(DICTIONARY_AUTHOR).add("draft EFSA conclusion");
|
||||||
reanlysisVersions.put("assessment report", 3L);
|
reanlysisVersions.put("draft EFSA conclusion", 3L);
|
||||||
when(dictionaryClient.getVersion(TEST_DOSSIER_TEMPLATE_ID)).thenReturn(3L);
|
when(dictionaryClient.getVersion(TEST_DOSSIER_TEMPLATE_ID)).thenReturn(3L);
|
||||||
mockDictionaryCalls(2L);
|
mockDictionaryCalls(2L);
|
||||||
analyzeService.reanalyze(request);
|
analyzeService.reanalyze(request);
|
||||||
@ -579,7 +580,7 @@ public class RedactionIntegrationTest extends RulesIntegrationTest {
|
|||||||
|
|
||||||
var changes = entityLog.getEntityLogEntry()
|
var changes = entityLog.getEntityLogEntry()
|
||||||
.stream()
|
.stream()
|
||||||
.filter(entry -> entry.getValue() != null && entry.getValue().equals("report"))
|
.filter(entry -> entry.getValue() != null && entry.getValue().equals("EFSA conclusion"))
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.get().getChanges();
|
.get().getChanges();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user