diff --git a/Kitodo/src/test/java/org/kitodo/production/services/file/FileServiceIT.java b/Kitodo/src/test/java/org/kitodo/production/services/file/FileServiceIT.java index 139163a8ed1..99334bf479f 100644 --- a/Kitodo/src/test/java/org/kitodo/production/services/file/FileServiceIT.java +++ b/Kitodo/src/test/java/org/kitodo/production/services/file/FileServiceIT.java @@ -154,7 +154,7 @@ public void testRenamingOfMultipleProcesses() throws DAOException, DataException // 2. perform media renaming RenameMediaThread renameMediaThread = new RenameMediaThread(testProcesses); renameMediaThread.start(); - renameMediaThread.join(); + renameMediaThread.join(3000); // 3. check filename & order values of both processes _after_ renaming assertTrue(mediaFilesNamedAccordingToOrderAttribute(mediaRenamingFirstProcessId)); assertTrue(mediaFilesNamedAccordingToOrderAttribute(mediaRenamingSecondProcessId)); @@ -178,7 +178,7 @@ public void testRevertingOriginalFilenamesAfterRenamingError() throws DAOExcepti Process process = ServiceManager.getProcessService().getById(revertMediaRenamingProcessId); RenameMediaThread renameMediaThread = new RenameMediaThread(Collections.singletonList(process)); renameMediaThread.start(); - renameMediaThread.join(); + renameMediaThread.join(3000); // 4. determine filenames after failed media renaming attempt List scanURIsAfterRenaming = ServiceManager.getFileService().getSubUris(ImageHelper.dataFilter, processScansDir.toUri()).stream().sorted().collect(Collectors.toList());