mirror of
https://github.com/apache/archiva.git
synced 2025-02-06 10:09:32 +00:00
Fixing locking tests on windows
This commit is contained in:
parent
151fae7e17
commit
b0f22a2469
@ -30,6 +30,7 @@
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.FileSystemException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
@ -72,7 +73,13 @@ public void testTimeout()
|
||||
|
||||
Lock lock = fileLockManager.writeFileLock(file);
|
||||
|
||||
Files.copy(largeJar.toPath(), lock.getFile().toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
try {
|
||||
Files.copy(largeJar.toPath(), lock.getFile().toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
} catch (IOException e) {
|
||||
logger.warn("Copy failed "+e.getMessage());
|
||||
// On windows a FileSystemException is thrown
|
||||
// We ignore this
|
||||
}
|
||||
|
||||
lock = fileLockManager.writeFileLock(file);
|
||||
} catch (FileSystemException ex) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user