aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2017-04-16 21:55:35 +0200
committerMartin Stockhammer <martin_s@apache.org>2017-04-16 21:55:35 +0200
commit151fae7e1787e926afa266c94825fe0d6d7b53f8 (patch)
treebc4081411ecdccdbc6aeb8a7be7574a7d262e95b
parentc29a3426db4dbc9ec504042058f0ed8409f7ed81 (diff)
downloadarchiva-151fae7e1787e926afa266c94825fe0d6d7b53f8.tar.gz
archiva-151fae7e1787e926afa266c94825fe0d6d7b53f8.zip
Adding additional information for failing tests
-rw-r--r--archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTimeoutTest.java19
1 files changed, 13 insertions, 6 deletions
diff --git a/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTimeoutTest.java b/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTimeoutTest.java
index 281d13105..cd2cba209 100644
--- a/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTimeoutTest.java
+++ b/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTimeoutTest.java
@@ -30,6 +30,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import javax.inject.Inject;
import javax.inject.Named;
import java.io.File;
+import java.nio.file.FileSystemException;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
@@ -62,17 +63,23 @@ public class DefaultFileLockManagerTimeoutTest
throws Throwable
{
- File file = new File( System.getProperty( "buildDirectory" ), "foo.txt" );
+ try {
+ File file = new File(System.getProperty("buildDirectory"), "foo.txt");
- Files.deleteIfExists( file.toPath() );
+ Files.deleteIfExists(file.toPath());
- File largeJar = new File( System.getProperty( "basedir" ), "src/test/cassandra-all-2.0.3.jar" );
+ File largeJar = new File(System.getProperty("basedir"), "src/test/cassandra-all-2.0.3.jar");
- Lock lock = fileLockManager.writeFileLock( file );
+ Lock lock = fileLockManager.writeFileLock(file);
- Files.copy( largeJar.toPath(), lock.getFile().toPath(), StandardCopyOption.REPLACE_EXISTING );
+ Files.copy(largeJar.toPath(), lock.getFile().toPath(), StandardCopyOption.REPLACE_EXISTING);
- lock = fileLockManager.writeFileLock( file );
+ lock = fileLockManager.writeFileLock(file);
+ } catch (FileSystemException ex) {
+ logger.error("Exception from filesystem "+ex.getMessage());
+ ex.printStackTrace();
+ throw ex;
+ }
}