ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maart...@apache.org
Subject svn commit: r786266 - /ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java
Date Thu, 18 Jun 2009 20:59:58 GMT
Author: maartenc
Date: Thu Jun 18 20:59:58 2009
New Revision: 786266

URL: http://svn.apache.org/viewvc?rev=786266&view=rev
Log:
Why do we need to set the context here?

Modified:
    ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java?rev=786266&r1=786265&r2=786266&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java Thu Jun 18 20:59:58
2009
@@ -98,40 +98,35 @@
 
 
     public void testResolveWithRetainingArtifactName() throws Exception {
-        ivy.pushContext();
-        try {
-            ((DefaultRepositoryCacheManager) settings.getDefaultRepositoryCacheManager())
+        ((DefaultRepositoryCacheManager) settings.getDefaultRepositoryCacheManager())
                 .setArtifactPattern(ivy.substitute("[module]/[originalname].[ext]"));
-            ResolveReport report = ivy.resolve(new File("test/repositories/2/mod15.2/ivy-1.1.xml")
-            .toURL(), getResolveOptions(new String[] {"default"}));
-            assertNotNull(report);
+        ResolveReport report = ivy.resolve(new File("test/repositories/2/mod15.2/ivy-1.1.xml")
+                .toURL(), getResolveOptions(new String[] {"default"}));
+        assertNotNull(report);
 
-            ArtifactDownloadReport[] dReports = report.getConfigurationReport("default")
-            .getDownloadReports(ModuleRevisionId.newInstance("org15", "mod15.1", "1.1"));
-            assertNotNull(dReports);
-            assertEquals("number of downloaded artifacts not correct", 1, dReports.length);
+        ArtifactDownloadReport[] dReports = report.getConfigurationReport("default")
+                .getDownloadReports(ModuleRevisionId.newInstance("org15", "mod15.1", "1.1"));
+        assertNotNull(dReports);
+        assertEquals("number of downloaded artifacts not correct", 1, dReports.length);
 
-            Artifact artifact = dReports[0].getArtifact();
-            assertNotNull(artifact);
+        Artifact artifact = dReports[0].getArtifact();
+        assertNotNull(artifact);
 
-            String cachePath = getArchivePathInCache(artifact);
-            assertTrue("artifact name has not been retained: " + cachePath, cachePath
+        String cachePath = getArchivePathInCache(artifact);
+        assertTrue("artifact name has not been retained: " + cachePath, cachePath
                 .endsWith("library.jar"));
 
-            dReports = report.getConfigurationReport("default").getDownloadReports(
+        dReports = report.getConfigurationReport("default").getDownloadReports(
                 ModuleRevisionId.newInstance("org14", "mod14.1", "1.1"));
-            assertNotNull(dReports);
-            assertEquals("number of downloaded artifacts not correct", 1, dReports.length);
+        assertNotNull(dReports);
+        assertEquals("number of downloaded artifacts not correct", 1, dReports.length);
 
-            artifact = dReports[0].getArtifact();
-            assertNotNull(artifact);
+        artifact = dReports[0].getArtifact();
+        assertNotNull(artifact);
 
-            cachePath = getArchivePathInCache(artifact);
-            assertTrue("artifact name has not been retained: " + cachePath, cachePath
+        cachePath = getArchivePathInCache(artifact);
+        assertTrue("artifact name has not been retained: " + cachePath, cachePath
                 .endsWith("mod14.1-1.1.jar"));
-        } finally {
-            ivy.popContext();
-        }
     }
 
     public void testArtifactOrigin() throws Exception {



Mime
View raw message