ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r1373626 - /ant/ivy/core/trunk/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java
Date Wed, 15 Aug 2012 20:52:45 GMT
Author: hibou
Date: Wed Aug 15 20:52:44 2012
New Revision: 1373626

URL: http://svn.apache.org/viewvc?rev=1373626&view=rev
Log:
IVY-1252 : fix unit tests

Modified:
    ant/ivy/core/trunk/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java?rev=1373626&r1=1373625&r2=1373626&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java Wed Aug 15
20:52:44 2012
@@ -37,6 +37,7 @@ import org.apache.ivy.core.module.descri
 import org.apache.ivy.core.module.id.ModuleRevisionId;
 import org.apache.ivy.core.report.ResolveReport;
 import org.apache.ivy.core.resolve.ResolveOptions;
+import org.apache.ivy.util.DefaultMessageLogger;
 import org.apache.ivy.util.Message;
 import org.apache.ivy.util.MockMessageLogger;
 import org.apache.tools.ant.Project;
@@ -51,6 +52,7 @@ public class RetrieveTest extends TestCa
         ivy = Ivy.newInstance();
         ivy.configure(new File("test/repositories/ivysettings.xml"));
         createCache();
+        Message.setDefaultLogger(new DefaultMessageLogger(Message.MSG_DEBUG));
     }
 
     private void createCache() {
@@ -195,15 +197,15 @@ public class RetrieveTest extends TestCa
         ModuleDescriptor md = report.getModuleDescriptor();
         assertNotNull(md);
 
-        getRetrieveOptions().setMakeSymlinks(true);
+        RetrieveOptions options = getRetrieveOptions().setMakeSymlinks(true);
 
         String pattern = "build/test/retrieve/[module]/[conf]/[artifact]-[revision].[ext]";
-        ivy.retrieve(md.getModuleRevisionId(), pattern, getRetrieveOptions());
+        ivy.retrieve(md.getModuleRevisionId(), pattern, options);
         assertLink(IvyPatternHelper.substitute(pattern, "org1", "mod1.2", "2.0", "mod1.2",
"jar",
             "jar", "default"));
 
         pattern = "build/test/retrieve/[module]/[conf]/[type]s/[artifact]-[revision].[ext]";
-        ivy.retrieve(md.getModuleRevisionId(), pattern, getRetrieveOptions());
+        ivy.retrieve(md.getModuleRevisionId(), pattern, options);
         assertLink(IvyPatternHelper.substitute(pattern, "org1", "mod1.2", "2.0", "mod1.2",
"jar",
             "jar", "default"));
     }
@@ -217,15 +219,15 @@ public class RetrieveTest extends TestCa
         ModuleDescriptor md = report.getModuleDescriptor();
         assertNotNull(md);
 
-        getRetrieveOptions().setMakeSymlinksInMass(true);
+        RetrieveOptions options = getRetrieveOptions().setMakeSymlinksInMass(true);
 
         String pattern = "build/test/retrieve/[module]/[conf]/[artifact]-[revision].[ext]";
-        ivy.retrieve(md.getModuleRevisionId(), pattern, getRetrieveOptions());
+        ivy.retrieve(md.getModuleRevisionId(), pattern, options);
         assertLink(IvyPatternHelper.substitute(pattern, "org1", "mod1.2", "2.0", "mod1.2",
"jar",
             "jar", "default"));
 
         pattern = "build/test/retrieve/[module]/[conf]/[type]s/[artifact]-[revision].[ext]";
-        ivy.retrieve(md.getModuleRevisionId(), pattern, getRetrieveOptions());
+        ivy.retrieve(md.getModuleRevisionId(), pattern, options);
         assertLink(IvyPatternHelper.substitute(pattern, "org1", "mod1.2", "2.0", "mod1.2",
"jar",
             "jar", "default"));
     }



Mime
View raw message