Skip to content
Snippets Groups Projects
Commit 7f14ab90 authored by ribeaudc's avatar ribeaudc
Browse files

fix: - ETL server Unit tests.

SVN: 6416
parent 414213af
No related branches found
No related tags found
No related merge requests found
...@@ -21,6 +21,7 @@ package ch.systemsx.cisd.common.exceptions; ...@@ -21,6 +21,7 @@ package ch.systemsx.cisd.common.exceptions;
* <p> * <p>
* This is usually triggered by interrupting the thread that the work package is processed in and * This is usually triggered by interrupting the thread that the work package is processed in and
* regularly checking with {@link #check()}. * regularly checking with {@link #check()}.
* </p>
* *
* @author Bernd Rinn * @author Bernd Rinn
*/ */
......
...@@ -59,19 +59,22 @@ public final class FileRenamingCallable implements Callable<Boolean> ...@@ -59,19 +59,22 @@ public final class FileRenamingCallable implements Callable<Boolean>
operationLog.error(String.format( operationLog.error(String.format(
"Path '%s' doesn't exist, so it can't be moved to '%s'.", sourceFile, "Path '%s' doesn't exist, so it can't be moved to '%s'.", sourceFile,
destinationFile)); destinationFile));
// Nothing to do here. So exit the looping by returning true. return false;
return true;
} }
if (destinationFile.exists()) if (destinationFile.exists())
{ {
operationLog.error(String.format("Destination path '%s' already exists.", operationLog.error(String.format("Destination path '%s' already exists.",
destinationFile)); destinationFile));
// Nothing to do here. So exit the looping by returning true. return false;
return true;
} }
operationLog.warn(String.format("Moving path '%s' to directory '%s' failed (attempt %d).",
sourceFile, destinationFile, ++failures));
final boolean renamed = sourceFile.renameTo(destinationFile); final boolean renamed = sourceFile.renameTo(destinationFile);
return renamed ? true : null; if (renamed == false)
{
operationLog.warn(String.format(
"Moving path '%s' to directory '%s' failed (attempt %d).", sourceFile,
destinationFile, ++failures));
return null;
}
return true;
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment