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: FC-199 - GroupMgrImplTest.testRoleGroups fails apacheds
Date Thu, 27 Oct 2016 04:12:20 GMT
Repository: directory-fortress-core
Updated Branches:
  refs/heads/master 6c64b32be -> c263238b4


FC-199 - GroupMgrImplTest.testRoleGroups fails apacheds


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/c263238b
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/tree/c263238b
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/diff/c263238b

Branch: refs/heads/master
Commit: c263238b49279214844dea7b3872fd1ad65c45e3
Parents: 6c64b32
Author: Shawn McKinney <smckinney@apache.org>
Authored: Sun Oct 23 11:40:20 2016 -0500
Committer: Shawn McKinney <smckinney@apache.org>
Committed: Sun Oct 23 11:40:20 2016 -0500

----------------------------------------------------------------------
 .../directory/fortress/core/impl/GroupMgrImplTest.java   | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/c263238b/src/test/java/org/apache/directory/fortress/core/impl/GroupMgrImplTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/directory/fortress/core/impl/GroupMgrImplTest.java b/src/test/java/org/apache/directory/fortress/core/impl/GroupMgrImplTest.java
index d9a1a9c..e940c1e 100644
--- a/src/test/java/org/apache/directory/fortress/core/impl/GroupMgrImplTest.java
+++ b/src/test/java/org/apache/directory/fortress/core/impl/GroupMgrImplTest.java
@@ -284,7 +284,16 @@ public class GroupMgrImplTest extends TestCase {
                 List<Group> actualGroups = groupMgr.roleGroups(role);
                 LOG.debug( "roleGroups role [" + role.getName() + "] successful" );
 
-                assertEquals( CLS_NM + ".roleGroups failed", expectedGroups, actualGroups);
+                assertNotNull( actualGroups );
+                // The two list sizes better match or fail the test case.
+                assertTrue( CLS_NM + "roleGroups list size test case", actualGroups.size()
== expectedGroups.size() );
+
+                // For each actual group, check to see if it was in expected.  If not fail
the test case.
+                for ( Group actualGroup : actualGroups )
+                {
+                    assertTrue( CLS_NM + ".roleGroups actual group name [" + actualGroup.getName()
+ "] not found", expectedGroups.contains( actualGroup ) );
+                    //TODO : should compare members in expected groups to members in actual
groups.
+                }
             }
         }
         catch ( SecurityException ex )


Mime
View raw message