[
https://issues.apache.org/jira/browse/HADOOP-16847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17034355#comment-17034355
]
Steve Loughran commented on HADOOP-16847:
-----------------------------------------
+1; merged to 3.2+.
I Forgot to say which test failed in the commit. Sorry
> Test can fail if HashSet iterates in a different order
> ------------------------------------------------------
>
> Key: HADOOP-16847
> URL: https://issues.apache.org/jira/browse/HADOOP-16847
> Project: Hadoop Common
> Issue Type: Improvement
> Components: test
> Affects Versions: 3.2.1
> Reporter: testfixer0
> Assignee: testfixer0
> Priority: Minor
> Fix For: 3.3.0, 3.2.2
>
> Attachments: HADOOP-16847-000.patch, HADOOP-16847-000.patch,
> HADOOP-16874-001.patch
>
>
> The test `testNegativeGroupCaching` can fail if the iteration order of
> HashSet changes. In detail, the method `assertEquals` (line 331) compares
> `groups.getGroups(user)` with an ArrayList `myGroups`. The method `getGroups`
> converts `allGroups` (a HashSet) to a list and it calls iterator in HashSet.
> However, the iteration is non-deterministic.
> This PR proposes to modify HashSet to LinkedHashSet for a deterministic order.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]