ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maart...@apache.org
Subject svn commit: r929239 - /ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java
Date Tue, 30 Mar 2010 20:01:55 GMT
Author: maartenc
Date: Tue Mar 30 20:01:55 2010
New Revision: 929239

URL: http://svn.apache.org/viewvc?rev=929239&view=rev
Log:
FIX: Transitive dependencies resolutions issue when eviction is triggered (IVY-1178)

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=929239&r1=929238&r2=929239&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 Tue Mar 30 20:01:55
2010
@@ -3310,6 +3310,33 @@ public class ResolveTest extends TestCas
                 .exists());
     }
 
+    public void testIVY1178() throws Exception {
+        Ivy ivy = new Ivy();
+        ivy.configure(new File("test/repositories/IVY-1178/ivysettings.xml"));
+        ResolveReport report = ivy.resolve(ResolveTest.class.getResource("ivy-1178.xml"),
+            getResolveOptions(new String[] {"*"}));
+
+        assertNotNull(report);
+        assertNotNull(report.getUnresolvedDependencies());
+        assertEquals("Number of unresolved dependencies not correct", 0, report
+                .getUnresolvedDependencies().length);
+        
+        // dependencies
+        assertTrue(getIvyFileInCache(
+            ModuleRevisionId.newInstance("myorg", "modD", "1.1")).exists());
+        assertTrue(getArchiveFileInCache("myorg", "modD", "1.1", "modD", "jar", "jar").exists());
+
+        // evicted dependencies
+        assertFalse(getIvyFileInCache(
+            ModuleRevisionId.newInstance("myorg", "modD", "1.0")).exists());
+        assertFalse(getArchiveFileInCache("myorg", "modD", "1.0", "modD", "jar", "jar").exists());
+        
+        // transitive dependencies of modD-1.1 (must not exist: transitive="false" !)
+        assertFalse(getIvyFileInCache(
+            ModuleRevisionId.newInstance("myorg", "modE", "1.1")).exists());
+        assertFalse(getArchiveFileInCache("myorg", "modE", "1.1", "modE", "jar", "jar").exists());
+    }
+
     public void testIVY999() throws Exception {
         Ivy ivy = new Ivy();
         ivy.configure(new File("test/repositories/IVY-999/ivysettings.xml"));



Mime
View raw message