]> source.dussan.org Git - archiva.git/commitdiff
cleanup some test code
authorOlivier Lamy <olamy@apache.org>
Fri, 4 Nov 2011 13:52:43 +0000 (13:52 +0000)
committerOlivier Lamy <olamy@apache.org>
Fri, 4 Nov 2011 13:52:43 +0000 (13:52 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1197570 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletTestCase.java
archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/util/MavenIndexerCleaner.java

index 653e5bb672b2fcece22c9c6f276946d45bbd9f72..766124d4cff06fc58323c89cd6e6756ce0b9f37e 100644 (file)
@@ -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();
index 54db5c91586de895f116e0cf0d50dcdc2b0195c2..3c7fcbfe5ef509a7be43757c6a7c67692cf72bd3 100644 (file)
@@ -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
-        }*/
-
     }