directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smckin...@apache.org
Subject directory-fortress-core git commit: tolerate
Date Sun, 25 Jun 2017 20:21:16 GMT
Repository: directory-fortress-core
Updated Branches:
  refs/heads/master 7524b3897 -> dcf323788


tolerate


Project: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/commit/dcf32378
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/tree/dcf32378
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/diff/dcf32378

Branch: refs/heads/master
Commit: dcf3237881741c9bcbb96bb3aed905b004005988
Parents: 7524b38
Author: Shawn McKinney <smckinney@apache.org>
Authored: Sun Jun 25 15:21:08 2017 -0500
Committer: Shawn McKinney <smckinney@apache.org>
Committed: Sun Jun 25 15:21:08 2017 -0500

----------------------------------------------------------------------
 .../core/samples/LoadTestUserSample.java        | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/dcf32378/src/test/java/org/apache/directory/fortress/core/samples/LoadTestUserSample.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/directory/fortress/core/samples/LoadTestUserSample.java
b/src/test/java/org/apache/directory/fortress/core/samples/LoadTestUserSample.java
index 9997c18..cfa3e29 100644
--- a/src/test/java/org/apache/directory/fortress/core/samples/LoadTestUserSample.java
+++ b/src/test/java/org/apache/directory/fortress/core/samples/LoadTestUserSample.java
@@ -68,10 +68,12 @@ public class LoadTestUserSample extends TestCase
     {
         TestSuite suite = new TestSuite();
 
+/*
         if(teardownRequired())
         {
             suite.addTest(new LoadTestUserSample("testDeleteUser"));
         }
+*/
         suite.addTest(new LoadTestUserSample("testCreateUser"));
         suite.addTest(new LoadTestUserSample("testAssignUser"));
         return suite;
@@ -124,7 +126,7 @@ public class LoadTestUserSample extends TestCase
         {
             // Instantiate the AdminMgr implementation which is used to provision RBAC policies.
             AdminMgr adminMgr = AdminMgrFactory.createInstance(TestUtils.getContext());
-            LOG.info(szLocation + " begin users delete... (every '-' is 1000 users)");
+            LOG.info(szLocation + "deleting [" + NUMBER_TEST_USERS + "] users... (every '-'
is 1000 users)");
             for( int i = 1; i <= NUMBER_TEST_USERS; i++)
             {
                 User inUser = new User( TEST_USERID + i );
@@ -164,7 +166,7 @@ public class LoadTestUserSample extends TestCase
              *   {@link User#setRole(String)}="sampleRole1"
              *   {@link User#ou}="sampleUserOU1"
              */
-            LOG.info(szLocation + " begin users add... (every '+' is 1000 users)");
+            LOG.info(szLocation + "CREATING [" + NUMBER_TEST_USERS + "] users... (every '+'
is 1000 users)");
             for( int i = 1; i <= NUMBER_TEST_USERS; i++)
             {
                 User inUser = new User(TEST_USERID + i, TEST_PASSWORD);
@@ -175,6 +177,10 @@ public class LoadTestUserSample extends TestCase
                     // Now call the add API.  The API will return User entity with associated
LDAP dn if creation was successful.
                     User outUser = adminMgr.addUser(inUser);
                     assertNotNull(outUser);
+                    if( i % 1000 == 0)
+                    {
+                        System.out.print( "+" );
+                    }
                 }
                 catch (SecurityException ex)
                 {
@@ -187,10 +193,10 @@ public class LoadTestUserSample extends TestCase
                         LOG.error(szLocation + "testAddUsers caught SecurityException rc="
+ ex.getErrorId() + ", msg=" + ex.getMessage(), ex);
                         fail(ex.getMessage());
                     }
-                }
-                if( i % 1000 == 0)
-                {
-                    System.out.print( "+" );
+                    if( i % 1000 == 0)
+                    {
+                        System.out.print( "=" );
+                    }
                 }
             }
             System.out.println("");
@@ -225,7 +231,7 @@ public class LoadTestUserSample extends TestCase
              */
             //User inUser = new User(TEST_USERID, TEST_PASSWORD, CreateRoleSample.TEST_SIMPLE_ROLE,
CreateUserOrgSample.TEST_USER_OU_NM);
             //User inUser = new User(TEST_USERID, TEST_PASSWORD, CreateRoleSample.TEST_SIMPLE_ROLE,
CreateUserOrgSample.TEST_USER_OU_NM);
-            LOG.info(szLocation + " begin users assign... (every '@' is 1000 users)");
+            LOG.info(szLocation + "ASSIGNING [" + NUMBER_TEST_USERS + "] users to [" + NUMBER_TEST_ROLES
+ "] roles (every '@' is 1000 users)");
             for( int i = 1; i <= NUMBER_TEST_USERS; i++)
             {
                 for( int j = 1; j <= NUMBER_TEST_ROLES; j++ )


Mime
View raw message