You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Shawn McKinney (JIRA)" <ji...@apache.org> on 2016/10/27 04:13:58 UTC
[jira] [Resolved] (FC-199) GroupMgrImplTest.testRoleGroups fails
apacheds
[ https://issues.apache.org/jira/browse/FC-199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shawn McKinney resolved FC-199.
-------------------------------
Resolution: Fixed
> GroupMgrImplTest.testRoleGroups fails apacheds
> ----------------------------------------------
>
> Key: FC-199
> URL: https://issues.apache.org/jira/browse/FC-199
> Project: FORTRESS
> Issue Type: Sub-task
> Affects Versions: 1.0.1
> Reporter: Shawn McKinney
> Assignee: Shawn McKinney
> Priority: Minor
> Fix For: 2.0.0-RC1
>
>
> The assertEquals cannot be used to compare collections as it is dependent on processing order:
> for ( String[] roleArray : roles )
> {
> Role role = RoleTestData.getRole(roleArray);
> List<Group> actualGroups = groupMgr.roleGroups(role);
> assertEquals( CLS_NM + ".roleGroups failed", expectedGroups, actualGroups);
> }
> change it to iterate over each group found and compare one by one:
> for ( String[] roleArray : roles )
> {
> Role role = RoleTestData.getRole(roleArray);
> List<Group> actualGroups = groupMgr.roleGroups(role);
> 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 ( Group actualGroup : actualGroups )
> {
> assertTrue( CLS_NM + "...."] not found", expectedGroups.contains( actualGroup ) );
> }
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)