archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1377860 - in /archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/test: java/org/apache/archiva/configuration/ArchivaConfigurationMRM789Test.java resources/spring-context.xml
Date Mon, 27 Aug 2012 21:03:39 GMT
Author: olamy
Date: Mon Aug 27 21:03:38 2012
New Revision: 1377860

URL: http://svn.apache.org/viewvc?rev=1377860&view=rev
Log:
fix unit test.
avoid using same registry singleton which is modified by one test.

Modified:
    archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ArchivaConfigurationMRM789Test.java
    archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/test/resources/spring-context.xml

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ArchivaConfigurationMRM789Test.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ArchivaConfigurationMRM789Test.java?rev=1377860&r1=1377859&r2=1377860&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ArchivaConfigurationMRM789Test.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ArchivaConfigurationMRM789Test.java
Mon Aug 27 21:03:38 2012
@@ -68,10 +68,10 @@ public class ArchivaConfigurationMRM789T
     public void testGetConfigurationFromDefaultsWithDefaultRepoLocationAlreadyExisting()
         throws Exception
     {
-        File repo = new File( FileUtil.getBasedir(), "/target/test-classes/existing_snapshots"
);
+        File repo = new File( FileUtil.getBasedir(), "target/test-classes/existing_snapshots"
);
         repo.mkdirs();
 
-        repo = new File( FileUtil.getBasedir(), "/target/test-classes/existing_internal"
);
+        repo = new File( FileUtil.getBasedir(), "target/test-classes/existing_internal" );
         repo.mkdirs();
 
         String existingTestDefaultArchivaConfigFile = FileUtils.readFileToString(
@@ -88,7 +88,7 @@ public class ArchivaConfigurationMRM789T
         ArchivaConfiguration archivaConfiguration =
             lookup( ArchivaConfiguration.class, "test-defaults-default-repo-location-exists"
);
         Configuration configuration = archivaConfiguration.getConfiguration();
-        assertConfiguration( configuration, 2, 1, 1 );
+        assertConfiguration( configuration, 2, 2, 2 );
 
         ManagedRepositoryConfiguration repository = configuration.getManagedRepositories().get(
0 );
         assertTrue( "check managed repositories", repository.getLocation().endsWith( "data/repositories/internal"
) );

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/test/resources/spring-context.xml
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/test/resources/spring-context.xml?rev=1377860&r1=1377859&r2=1377860&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/test/resources/spring-context.xml
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-configuration/src/test/resources/spring-context.xml
Mon Aug 27 21:03:38 2012
@@ -32,16 +32,19 @@
   <bean name="archivaConfiguration#test-defaults-default-repo-location-exists" class="org.apache.archiva.configuration.DefaultArchivaConfiguration">
     <property name="registry" ref="registry#empty"/>
   </bean>
+  <bean name="registry#empty" class="org.apache.archiva.redback.components.registry.commons.CommonsConfigurationRegistry"/>
 
   <bean name="archivaConfiguration#test-defaults" class="org.apache.archiva.configuration.DefaultArchivaConfiguration">
-    <property name="registry" ref="registry#empty"/>
+    <property name="registry" ref="registry#emptydef"/>
   </bean>
-  <bean name="registry#empty" class="org.apache.archiva.redback.components.registry.commons.CommonsConfigurationRegistry"/>
+  <bean name="registry#emptydef" class="org.apache.archiva.redback.components.registry.commons.CommonsConfigurationRegistry"/>
 
   <bean name="archivaConfiguration#test-upgrade-09"  class="org.apache.archiva.configuration.DefaultArchivaConfiguration">
     <property name="registry" ref="registry#test-upgrade-09"/>
   </bean>
 
+
+
   <bean name="registry#test-upgrade-09" class="org.apache.archiva.redback.components.registry.commons.CommonsConfigurationRegistry">
     <property name="properties">
       <value>



Mime
View raw message