-
Sub-task
-
Resolution: Done
-
Major
-
None
-
None
The tests, testJdbc() and testControlFlags() ,fail when run with JDK 6 as the assertions verifying if the role is valid fail. It appears to be the way the test is coded to look up the member in the Set of Groups. Simply backported the change which has been done for similar reasons in AS 5:
- Group roles = (Group) groups.iterator().next();
+ Group roles = findRolesGroup(groups);
assertTrue("Java is a role", roles.isMember(new SimplePrincipal("Java")));
assertTrue("Coder is a role", roles.isMember(new SimplePrincipal("Coder")));
- Group roles = (Group) groups.iterator().next();
+ Group roles = findRolesGroup(groups);
// Only the roles from the DatabaseServerLoginModule should exist
assertTrue("Role1 is a role", roles.isMember(new SimplePrincipal("Role1")));
assertTrue("Role2 is a role", roles.isMember(new SimplePrincipal("Role2")));
// Method to find the group named "Roles" in the given Set of groups.
+ private Group findRolesGroup(Set groups)
+ {
+ // Find the "Roles" group:
+ Iterator groupsIter = groups.iterator();
+ Group roles = null;
+ while (groupsIter.hasNext())
+ return roles;
+ }
- relates to
-
JBPAPP-814 Resolve JBoss AS Test Suite Issues when running with JavaSE 6
- Resolved