[
https://issues.apache.org/jira/browse/COLLECTIONS-768?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claude Warren resolved COLLECTIONS-768.
---------------------------------------
Fix Version/s: 4.5
Resolution: Resolved
Issue was fixed as per comments in the pull request.
> Flat3MapTest.tesetEntrySet() is flaky
> -------------------------------------
>
> Key: COLLECTIONS-768
> URL: https://issues.apache.org/jira/browse/COLLECTIONS-768
> Project: Commons Collections
> Issue Type: Bug
> Components: Map
> Affects Versions: 4.4
> Reporter: XinT
> Priority: Minor
> Labels: easyfix, pull-request-available
> Fix For: 4.5
>
> Time Spent: 2h 20m
> Remaining Estimate: 0h
>
> The testEntrySet() function
> (org.apache.commons.collections4.map.Flat3MapTest#testEntrySet) is flaky
> because it uses a flaky helper function putAndRemove(). The helper function
> wrongly assumes that map iterators execute in insertion order, while in fact
> it can be any order.
> The current test asserts the last element iterated (and subsequently removed)
> is the last element inserted. Therefore, the test passes when it so happens
> that the last iterated element is the last inserted element, but fails
> otherwise.
>
> The proposed fix is: https://github.com/apache/commons-collections/pull/189
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)