ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maart...@apache.org
Subject svn commit: r944410 - /ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java
Date Fri, 14 May 2010 19:20:11 GMT
Author: maartenc
Date: Fri May 14 19:20:11 2010
New Revision: 944410

URL: http://svn.apache.org/viewvc?rev=944410&view=rev
Log:
Cleanup deliver directory after test

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=944410&r1=944409&r2=944410&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 Fri May 14 19:20:11
2010
@@ -65,6 +65,7 @@ import org.apache.ivy.util.CacheCleaner;
 import org.apache.ivy.util.FileUtil;
 import org.apache.ivy.util.MockMessageLogger;
 import org.apache.ivy.util.StringUtils;
+import org.apache.tools.ant.util.FileUtils;
 import org.xml.sax.SAXException;
 import org.xml.sax.helpers.DefaultHandler;
 
@@ -77,6 +78,7 @@ public class ResolveTest extends TestCas
     private IvySettings settings;
 
     private File cache;
+    private File deliverDir;
 
     public ResolveTest() {
     }
@@ -85,6 +87,9 @@ public class ResolveTest extends TestCas
         cache = new File("build/cache");
         System.setProperty("ivy.cache.dir", cache.getAbsolutePath());
         createCache();
+        
+        deliverDir = new File("build/test/deliver");
+        deliverDir.mkdirs();
 
         ivy = Ivy.newInstance();
         ivy.configure(new File("test/repositories/ivysettings.xml"));
@@ -97,6 +102,7 @@ public class ResolveTest extends TestCas
 
     protected void tearDown() throws Exception {
         CacheCleaner.deleteDir(cache);
+        FileUtil.forceDelete(deliverDir);
     }
 
 
@@ -4963,9 +4969,9 @@ public class ResolveTest extends TestCas
             getResolveOptions(ivy.getSettings(), new String[] {"*"}).setValidate(false));
         assertFalse(report.hasError());
         
-        ivy.deliver("1.0.0", "build/test/extra-attributes-forceddependencies/ivy-1.0.0.xml",
new DeliverOptions().setResolveId(report.getResolveId()).setValidate(false).setPubdate(new
Date()));
+        ivy.deliver("1.0.0", deliverDir.getAbsolutePath() + "/ivy-1.0.0.xml", new DeliverOptions().setResolveId(report.getResolveId()).setValidate(false).setPubdate(new
Date()));
         
-        File deliveredIvyFile = new File("build/test/extra-attributes-forceddependencies/ivy-1.0.0.xml");
+        File deliveredIvyFile = new File(deliverDir, "ivy-1.0.0.xml");
         assertTrue(deliveredIvyFile.exists());
         ModuleDescriptor md = XmlModuleDescriptorParser.getInstance().parseDescriptor(
             ivy.getSettings(), deliveredIvyFile.toURL(), false);
@@ -4986,9 +4992,9 @@ public class ResolveTest extends TestCas
             getResolveOptions(ivy.getSettings(), new String[] {"*"}).setValidate(false));
         assertFalse(report.hasError());
         
-        ivy.deliver("1.0.0", "build/test/extra-attributes-forceddependencies/ivy-1.0.0.xml",
new DeliverOptions().setResolveId(report.getResolveId()).setValidate(false).setPubdate(new
Date()));
+        ivy.deliver("1.0.0", deliverDir.getAbsolutePath() + "/ivy-1.0.0.xml", new DeliverOptions().setResolveId(report.getResolveId()).setValidate(false).setPubdate(new
Date()));
         
-        File deliveredIvyFile = new File("build/test/extra-attributes-forceddependencies/ivy-1.0.0.xml");
+        File deliveredIvyFile = new File(deliverDir, "ivy-1.0.0.xml");
         assertTrue(deliveredIvyFile.exists());
         ModuleDescriptor md = XmlModuleDescriptorParser.getInstance().parseDescriptor(
             ivy.getSettings(), deliveredIvyFile.toURL(), false);



Mime
View raw message