]> source.dussan.org Git - archiva.git/commitdiff
remove some system.out
authorOlivier Lamy <olamy@apache.org>
Wed, 21 Nov 2012 22:29:59 +0000 (22:29 +0000)
committerOlivier Lamy <olamy@apache.org>
Wed, 21 Nov 2012 22:29:59 +0000 (22:29 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1412335 13f79535-47bb-0310-9956-ffa450edef68

redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/AbstractRestServicesTest.java
redback-rbac/redback-rbac-role-manager/src/test/java/org/apache/archiva/redback/role/AbstractRoleManagerTest.java
redback-rbac/redback-rbac-tests/src/main/java/org/apache/archiva/redback/tests/AbstractRbacManagerPerformanceTestCase.java
redback-rbac/redback-rbac-tests/src/main/java/org/apache/archiva/redback/tests/RbacManagerEventTracker.java
redback-users/redback-users-providers/redback-users-configurable/src/main/java/org/apache/archiva/redback/users/configurable/ConfigurableUserManager.java
redback-users/redback-users-providers/redback-users-ldap/src/test/java/org/apache/archiva/redback/users/ldap/LdapUserManagerTest.java

index 580a116418b42c4f573511bdbc13f27beb928a2e..05d0c0a5c04feafad454193850d1ec539530810d 100644 (file)
@@ -78,7 +78,7 @@ public abstract class AbstractRestServicesTest
 
     protected String getSpringConfigLocation()
     {
-        return "classpath*:META-INF/spring-context.xml";
+        return "classpath*:spring-context.xml,classpath*:META-INF/spring-context.xml";
     }
 
 
index 63b027246c44847c4bbf967d1bba417ba9ea1986..ee992a0dce25fe594070eefd454d145d0bd47e4e 100644 (file)
@@ -30,6 +30,8 @@ import org.apache.archiva.redback.role.model.ModelTemplate;
 import org.apache.archiva.redback.role.util.RoleModelUtils;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
@@ -47,6 +49,8 @@ public abstract class AbstractRoleManagerTest
     extends TestCase
 {
 
+    protected Logger logger = LoggerFactory.getLogger( getClass() );
+
     protected RBACManager rbacManager;
 
     protected RoleManager roleManager;
@@ -112,7 +116,7 @@ public abstract class AbstractRoleManagerTest
 
         for ( String roleName : assignments )
         {
-            System.out.println( roleName );
+            logger.info( roleName );
             assertTrue( "Test Role".equals( roleName ) || "Foo 2 - frigid".equals( roleName ) || "Test Role 1".equals( roleName ) );
         }
     }
index 212f2f6e752dec4ea25219a1edd7a01c9adac216..11eacdd106ef59fa8d3414ef68e79e076f8ff578 100644 (file)
@@ -29,6 +29,8 @@ import org.apache.archiva.redback.rbac.Operation;
 import org.apache.archiva.redback.tests.utils.RBACDefaults;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
@@ -43,6 +45,8 @@ public class AbstractRbacManagerPerformanceTestCase
 
     private RBACDefaults rbacDefaults;
 
+    protected Logger logger = LoggerFactory.getLogger( getClass() );
+
     public void setRbacManager( RBACManager store )
     {
         this.rbacManager = store;
@@ -92,7 +96,7 @@ public class AbstractRbacManagerPerformanceTestCase
         double ratio = (double) elapsed / (double) ONESECOND; // ratio of time to 1 second.
         double opsPerSecond = (double) iterations / ratio;
 
-        System.out.println( "Performance " + msg + ": " + opsPerSecond + " operations per second. (effective)" );
+        logger.info( "Performance {}: {} operations per second. (effective)", msg, opsPerSecond );
 
         if ( opsPerSecond < threshold )
         {
@@ -107,7 +111,7 @@ public class AbstractRbacManagerPerformanceTestCase
             stats.append( "\nRatio          : " ).append( Double.toString( ratio ) );
             stats.append( "\nOps per second : " ).append( Double.toString( opsPerSecond ) );
 
-            System.out.println( stats.toString() );
+            logger.info( stats.toString() );
 
             fail( "Performance Error: " + msg + " expecting greater than [" + threshold + "], actual [" + opsPerSecond
                 + "]" );
index 912e15058518f5c3f0c726208c6492d48112aaf5..26c8f98923ab9f3b693ff308a9be76d6b69f100f 100644 (file)
@@ -23,6 +23,8 @@ import org.apache.archiva.redback.rbac.RBACManagerListener;
 import org.apache.archiva.redback.rbac.Permission;
 import org.apache.archiva.redback.rbac.Role;
 import org.apache.archiva.redback.rbac.UserAssignment;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -48,6 +50,8 @@ public class RbacManagerEventTracker
 
     public List<String> removedPermissionNames = new ArrayList<String>();
 
+    protected Logger logger = LoggerFactory.getLogger( getClass() );
+
     public void rbacInit( boolean freshdb )
     {
         log( "Init - freshdb: " + freshdb );
@@ -107,6 +111,6 @@ public class RbacManagerEventTracker
 
     private void log( String msg )
     {
-        System.out.println( "[RBAC Event Tracker] " + msg );
+        logger.info( "[RBAC Event Tracker] : {}", msg );
     }
 }
index f4d5cf40ae1289f11621f9ec227c215b6178fb11..9805d2da8d702c29ffde88f0539312c9960de439 100644 (file)
@@ -60,8 +60,9 @@ public class ConfigurableUserManager
                 "User Manager Configuration Missing: " + USER_MANAGER_IMPL + " configuration property" );
         }
 
+        log.info( "use userManager impl with key: '{}'", userManagerRole );
+
         userManagerImpl = applicationContext.getBean( "userManager#" + userManagerRole, UserManager.class );
-        // (UserManager) container.lookup( UserManager.class.getName(), userManagerRole );
     }
 
     public User addUser( User user )
index d60d0e4702ea4286babc0b8c84ab4e430afe622b..e3c298b22b981e993da08d5c80308995c7e92a63 100644 (file)
@@ -212,8 +212,8 @@ public class LdapUserManagerTest
         assertEquals( "jesse", jesse.getPrincipal().toString() );
         assertEquals( "jesse@apache.org", jesse.getEmail() );
         assertEquals( "foo", jesse.getFullName() );
-        System.out.println( "=====>"+jesse.getEncodedPassword());
-        System.out.println( "=====>"+passwordEncoder.encodePassword( "foo" ));
+        log.info( "=====>"+jesse.getEncodedPassword());
+        log.info( "=====>"+passwordEncoder.encodePassword( "foo" ));
         assertTrue( passwordEncoder.isPasswordValid( jesse.getEncodedPassword(), "foo" ) );
 
     }