[ https://issues.apache.org/jira/browse/AMBARI-17004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15312177#comment-15312177 ]
Miklos Gergely commented on AMBARI-17004: ----------------------------------------- AmbariLdapDataPopulatorTest.testSynchronizeExistingLdapGroups_removeDuringIteration AmbariLdapDataPopulatorTest:328-329 specifies that getLdapGroups should return groupDtos created at AmbariLdapDataPopulatorTest:306 for both group1 and group2. At AmbariLdapDataPopulator:325 it grabs the first element of groupDtos, and if it's not group1Dto but group2Dto then it will return an empty set for the getMemberAttributes() at AmbariLdapDataPopulator:374 thus getLdapGroupByMemberAttr("group2") will not be invoked, which is expected. Suggested solution: separate groupDto for group1 and group2, containing only the given group. > Unit tests failing because of the order of hash sets/maps > --------------------------------------------------------- > > Key: AMBARI-17004 > URL: https://issues.apache.org/jira/browse/AMBARI-17004 > Project: Ambari > Issue Type: Bug > Reporter: Miklos Gergely > > Some unit tests are failing because they depend on the order elements are > returned by the iterator of a HashSet/HashMap. Usually they are small (2-3 > entries), so they may easily produce good results. Still in other > environments they fail as the order the elements are returned from a > HashSet/HashMap may depend on the JVM used. > The tests will be described in the comments. -- This message was sent by Atlassian JIRA (v6.3.4#6332)