]> source.dussan.org Git - archiva.git/commitdiff
an other try to prevent windauze file leak
authorOlivier Lamy <olamy@apache.org>
Tue, 22 Nov 2011 09:06:06 +0000 (09:06 +0000)
committerOlivier Lamy <olamy@apache.org>
Tue, 22 Nov 2011 09:06:06 +0000 (09:06 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1204866 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/AbstractProxyTestCase.java
archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/MetadataTransferTest.java

index bd51f350d65b2ed3235f81c04fc64079ac39def6..14ed55352fa7cb837cb061609a7550037046ad70 100644 (file)
@@ -164,7 +164,9 @@ public abstract class AbstractProxyTestCase
             ManagedRepositoryAdmin.class ) ).setArchivaConfiguration( config );
 
         applicationContext.getBean( ManagedRepositoryAdmin.class ).addManagedRepository( repoConfig, false, null );
-        //config.getConfiguration().addManagedRepository( repoConfig );
+
+        // to prevent windauze file leaking
+        removeMavenIndexes();
 
         // Setup source repository (using legacy layout)
         repoLocation = new File( REPOPATH_LEGACY_MANAGED_TARGET );
@@ -218,6 +220,13 @@ public abstract class AbstractProxyTestCase
     @After
     public void shutdown()
         throws Exception
+    {
+       removeMavenIndexes();
+    }
+
+
+    protected void removeMavenIndexes()
+        throws Exception
     {
         NexusIndexer nexusIndexer = plexusSisuBridge.lookup( NexusIndexer.class );
 
index dc2fbf44969d8d89b5813bedc1c24540153deb3e..928b669e1fb6dd65e31598670ab405cb4c7f551b 100644 (file)
@@ -103,13 +103,6 @@ public class MetadataTransferTest
     @Named(value = "metadataTools#mocked")
     private MetadataTools metadataTools;
 
-    @Before
-    public void init()
-        throws Exception
-    {
-        super.setUp();
-        //metadataTools = applicationContext.getBean( MetadataTools.class );
-    }
 
     @Test
     public void testGetProjectMetadataProxiedNotLocalOnRemoteConnectoDisabled()