From: Olivier Lamy Date: Tue, 22 Nov 2011 10:43:47 +0000 (+0000) Subject: an other try to prevent windauze file leak X-Git-Tag: archiva-1.4-M2~84 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5f6f2e9833b08f79d37d7e461d715f84878dca0b;p=archiva.git 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 --- diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurgeTest.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurgeTest.java index f65cc9176..6cacc59be 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurgeTest.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurgeTest.java @@ -102,7 +102,6 @@ public abstract class AbstractRepositoryPurgeTest @Inject protected PlexusSisuBridge plexusSisuBridge; - ArchivaConfiguration previousArchivaConfiguration; @Before public void setUp() @@ -110,6 +109,8 @@ public abstract class AbstractRepositoryPurgeTest { super.setUp(); + removeMavenIndexes(); + listenerControl = MockControl.createControl( RepositoryListener.class ); listener = (RepositoryListener) listenerControl.getMock(); @@ -118,10 +119,8 @@ public abstract class AbstractRepositoryPurgeTest metadataRepository = mock( MetadataRepository.class ); when( repositorySession.getRepository() ).thenReturn( metadataRepository ); - previousArchivaConfiguration = ( (DefaultManagedRepositoryAdmin) applicationContext.getBean( - ManagedRepositoryAdmin.class ) ).getArchivaConfiguration(); - removeMavenIndexes(); + } @After diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/CleanupReleasedSnapshotsRepositoryPurgeTest.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/CleanupReleasedSnapshotsRepositoryPurgeTest.java index 514c381cb..5c7184687 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/CleanupReleasedSnapshotsRepositoryPurgeTest.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/CleanupReleasedSnapshotsRepositoryPurgeTest.java @@ -85,6 +85,7 @@ public class CleanupReleasedSnapshotsRepositoryPurgeTest ( (DefaultManagedRepositoryAdmin) applicationContext.getBean( ManagedRepositoryAdmin.class ) ).setArchivaConfiguration( archivaConfiguration ); + removeMavenIndexes(); } @Test