From: Olivier Lamy Date: Fri, 4 Nov 2011 13:52:43 +0000 (+0000) Subject: cleanup some test code X-Git-Tag: archiva-1.4-M2~157 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2b4b9f0c0b980152bb42b403d4519823ed192f9d;p=archiva.git cleanup some test code git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1197570 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletTestCase.java b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletTestCase.java index 653e5bb67..766124d4c 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletTestCase.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletTestCase.java @@ -89,39 +89,6 @@ public abstract class AbstractRepositoryServletTestCase saveConfiguration( archivaConfiguration ); } - @BeforeClass - public static void lockCleanup() - throws Exception - { - /* - - try - { - - /* - Field locks = NativeFSLockFactory.class.getDeclaredClasses()[0].getField( "LOCK_HELD" ); - locks.setAccessible( true ); - Method clear = locks.getClass().getMethod( "clear" ); - - clear.invoke( field, null ); - */ - - /* - NativeFSLockFactory nativeFSLockFactory = - new NativeFSLockFactory( new File( "target/appserver-base/data/repositories/internal/.indexer" ) ); - - Lock lock = nativeFSLockFactory.makeLock( "write.lock" ); - lock.release(); - LoggerFactory.getLogger( AbstractRepositoryServletTestCase.class ).info( "cleanup lock" ); - - - } - catch ( LockReleaseFailedException e ) - { - // ignore - } - */ - } @Before @@ -129,7 +96,6 @@ public abstract class AbstractRepositoryServletTestCase throws Exception { - lockCleanup(); super.setUp(); String appserverBase = new File( "target/appserver-base" ).getAbsolutePath(); diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/util/MavenIndexerCleaner.java b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/util/MavenIndexerCleaner.java index 54db5c915..3c7fcbfe5 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/util/MavenIndexerCleaner.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/util/MavenIndexerCleaner.java @@ -110,20 +110,6 @@ public class MavenIndexerCleaner nexusIndexer.removeIndexingContext( context, true ); } - /* - try - { - NativeFSLockFactory nativeFSLockFactory = - new NativeFSLockFactory( new File( "target/appserver-base/data/repositories/internal/.indexer" ) ); - Lock lock = nativeFSLockFactory.makeLock( "write.lock" ); - lock.release(); - log.info( "cleanup lock" ); - } - catch ( LockReleaseFailedException e ) - { - // ignore - }*/ - }