an other try to prevent windauze file leak

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1204908 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2011-11-22 10:43:47 +00:00
parent 4b16406276
commit 5f6f2e9833
2 changed files with 4 additions and 4 deletions

View File

@ -102,7 +102,6 @@ public abstract class AbstractRepositoryPurgeTest
@Inject @Inject
protected PlexusSisuBridge plexusSisuBridge; protected PlexusSisuBridge plexusSisuBridge;
ArchivaConfiguration previousArchivaConfiguration;
@Before @Before
public void setUp() public void setUp()
@ -110,6 +109,8 @@ public abstract class AbstractRepositoryPurgeTest
{ {
super.setUp(); super.setUp();
removeMavenIndexes();
listenerControl = MockControl.createControl( RepositoryListener.class ); listenerControl = MockControl.createControl( RepositoryListener.class );
listener = (RepositoryListener) listenerControl.getMock(); listener = (RepositoryListener) listenerControl.getMock();
@ -118,10 +119,8 @@ public abstract class AbstractRepositoryPurgeTest
metadataRepository = mock( MetadataRepository.class ); metadataRepository = mock( MetadataRepository.class );
when( repositorySession.getRepository() ).thenReturn( metadataRepository ); when( repositorySession.getRepository() ).thenReturn( metadataRepository );
previousArchivaConfiguration = ( (DefaultManagedRepositoryAdmin) applicationContext.getBean(
ManagedRepositoryAdmin.class ) ).getArchivaConfiguration();
removeMavenIndexes();
} }
@After @After

View File

@ -85,6 +85,7 @@ public class CleanupReleasedSnapshotsRepositoryPurgeTest
( (DefaultManagedRepositoryAdmin) applicationContext.getBean( ( (DefaultManagedRepositoryAdmin) applicationContext.getBean(
ManagedRepositoryAdmin.class ) ).setArchivaConfiguration( archivaConfiguration ); ManagedRepositoryAdmin.class ) ).setArchivaConfiguration( archivaConfiguration );
removeMavenIndexes();
} }
@Test @Test