diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/AbstractProxyTestCase.java b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/AbstractProxyTestCase.java index d71e396d5..a2135c48d 100644 --- a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/AbstractProxyTestCase.java +++ b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/AbstractProxyTestCase.java @@ -40,6 +40,8 @@ import org.easymock.ArgumentsMatcher; import org.easymock.MockControl; import org.junit.Before; import org.junit.runner.RunWith; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.context.ApplicationContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @@ -120,6 +122,8 @@ public abstract class AbstractProxyTestCase protected MockConfiguration config; + protected Logger log = LoggerFactory.getLogger( getClass() ); + WagonDelegate delegate; @Inject @@ -187,7 +191,7 @@ public abstract class AbstractProxyTestCase delegate.setDelegate( wagonMock ); - System.out.println( "\n.\\ " + getName() + "() \\._________________________________________\n" ); + log.info( "\n.\\ " + getName() + "() \\._________________________________________\n" ); } @Override diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/MetadataTransferTest.java b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/MetadataTransferTest.java index 09a6de673..ebcf5cb4e 100644 --- a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/MetadataTransferTest.java +++ b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/MetadataTransferTest.java @@ -41,6 +41,7 @@ import org.custommonkey.xmlunit.Diff; import org.junit.Before; import org.junit.Test; +import javax.inject.Inject; import java.io.File; import java.io.StringWriter; import java.util.ArrayList; @@ -95,14 +96,15 @@ public class MetadataTransferTest extends AbstractProxyTestCase { + @Inject private MetadataTools metadataTools; @Before public void init() throws Exception { - super.setUp(); - metadataTools = applicationContext.getBean( MetadataTools.class ); + //super.setUp(); + //metadataTools = applicationContext.getBean( MetadataTools.class ); } @Test @@ -187,6 +189,8 @@ public class MetadataTransferTest String requestedResource = "org/apache/maven/test/get-default-metadata-nonexistant/maven-metadata.xml"; setupTestableManagedRepository( requestedResource ); + config.getConfiguration().setProxyConnectors( new ArrayList( ) ); + assertResourceNotFound( requestedResource ); // No proxy setup, nothing fetched, failure expected.