Skip to content

Commit

Permalink
Add timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
solth committed Nov 14, 2023
1 parent 2aac76e commit 0415270
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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<URI> scanURIsAfterRenaming = ServiceManager.getFileService().getSubUris(ImageHelper.dataFilter,
processScansDir.toUri()).stream().sorted().collect(Collectors.toList());
Expand Down

0 comments on commit 0415270

Please sign in to comment.