mirror of https://github.com/apache/archiva.git
cleanup some test code
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1197570 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
840cabb0fb
commit
2b4b9f0c0b
|
@ -89,39 +89,6 @@ public abstract class AbstractRepositoryServletTestCase
|
||||||
saveConfiguration( archivaConfiguration );
|
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
|
@Before
|
||||||
|
@ -129,7 +96,6 @@ public abstract class AbstractRepositoryServletTestCase
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
|
||||||
lockCleanup();
|
|
||||||
super.setUp();
|
super.setUp();
|
||||||
|
|
||||||
String appserverBase = new File( "target/appserver-base" ).getAbsolutePath();
|
String appserverBase = new File( "target/appserver-base" ).getAbsolutePath();
|
||||||
|
|
|
@ -110,20 +110,6 @@ public class MavenIndexerCleaner
|
||||||
nexusIndexer.removeIndexingContext( context, true );
|
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
|
|
||||||
}*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue