From fe4d205bce4c65a352a383d273ddd4871e57925e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cle=CC=81ment=20Doumouro?= Date: Tue, 12 Nov 2024 13:08:00 +0100 Subject: [PATCH] fix: test after rebase --- .../tasks/CreateNlpBatchesFromIndexParametrizedTest.java | 8 +++++--- .../datashare/tasks/CreateNlpBatchesFromIndexTest.java | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/datashare-app/src/test/java/org/icij/datashare/tasks/CreateNlpBatchesFromIndexParametrizedTest.java b/datashare-app/src/test/java/org/icij/datashare/tasks/CreateNlpBatchesFromIndexParametrizedTest.java index 2af7faa2d..c3ef3bd10 100644 --- a/datashare-app/src/test/java/org/icij/datashare/tasks/CreateNlpBatchesFromIndexParametrizedTest.java +++ b/datashare-app/src/test/java/org/icij/datashare/tasks/CreateNlpBatchesFromIndexParametrizedTest.java @@ -66,7 +66,7 @@ void enqueueBatch(List batch) { public void setUp() { DatashareTaskFactory factory = mock(DatashareTaskFactory.class); when(factory.createBatchNlpTask(any(), any())).thenReturn(mock(BatchNlpTask.class)); - taskManager = new TaskManagerMemory(new LinkedBlockingQueue<>(), factory); + taskManager = new TaskManagerMemory(new LinkedBlockingQueue<>(), factory, new PropertiesProvider()); } @After @@ -76,7 +76,8 @@ public void tearDown() throws IOException { } - public CreateNlpBatchesFromIndexParametrizedTest(int batchSize, int scrollSize, List> expectedLanguages) { + public CreateNlpBatchesFromIndexParametrizedTest(int batchSize, int scrollSize, + List> expectedLanguages) { this.batchSize = batchSize; this.scrollSize = scrollSize; this.expectedLanguages = expectedLanguages; @@ -86,7 +87,8 @@ public CreateNlpBatchesFromIndexParametrizedTest(int batchSize, int scrollSize, public static Collection taskParams() { return List.of( new Object[] {7, 3, List.of( - List.of(Language.ENGLISH, Language.ENGLISH, Language.ENGLISH, Language.ENGLISH, Language.ENGLISH, Language.ENGLISH, Language.ENGLISH), + List.of(Language.ENGLISH, Language.ENGLISH, Language.ENGLISH, Language.ENGLISH, Language.ENGLISH, + Language.ENGLISH, Language.ENGLISH), List.of(Language.ENGLISH, Language.ENGLISH, Language.ENGLISH), List.of(Language.FRENCH, Language.FRENCH, Language.FRENCH, Language.FRENCH, Language.FRENCH), List.of(Language.SPANISH, Language.SPANISH, Language.SPANISH, Language.SPANISH, Language.SPANISH) diff --git a/datashare-app/src/test/java/org/icij/datashare/tasks/CreateNlpBatchesFromIndexTest.java b/datashare-app/src/test/java/org/icij/datashare/tasks/CreateNlpBatchesFromIndexTest.java index 1ad599d5b..7c495cab3 100644 --- a/datashare-app/src/test/java/org/icij/datashare/tasks/CreateNlpBatchesFromIndexTest.java +++ b/datashare-app/src/test/java/org/icij/datashare/tasks/CreateNlpBatchesFromIndexTest.java @@ -41,7 +41,7 @@ public class CreateNlpBatchesFromIndexTest { public void setUp() { DatashareTaskFactory factory = mock(DatashareTaskFactory.class); when(factory.createBatchNlpTask(any(), any())).thenReturn(mock(BatchNlpTask.class)); - taskManager = new TaskManagerMemory(new LinkedBlockingQueue<>(), factory); + taskManager = new TaskManagerMemory(new LinkedBlockingQueue<>(), factory, new PropertiesProvider()); } @After