[ 
https://issues.apache.org/jira/browse/COLLECTIONS-768?focusedWorklogId=498356&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-498356
 ]

ASF GitHub Bot logged work on COLLECTIONS-768:
----------------------------------------------

                Author: ASF GitHub Bot
            Created on: 09/Oct/20 14:00
            Start Date: 09/Oct/20 14:00
    Worklog Time Spent: 10m 
      Work Description: tongxin97 edited a comment on pull request #189:
URL: 
https://github.com/apache/commons-collections/pull/189#issuecomment-705869080


   Hi again Bruno @kinow Thanks for the very thorough reply. 
   
   I see what you are trying to do in the code segment. Based on [the Java 
Doc](https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/Flat3Map.html),
 I think like HashMap, Flat3Map itself is not supposed to preserve any order in 
its entry set. So under this test, Flat3Map should behave like HashMap and the 
current fix should be good. I hope another developer can take a look and 
confirm this :)
   
   ~Xin


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 498356)
    Time Spent: 1.5h  (was: 1h 20m)

> 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
>          Time Spent: 1.5h
>  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.3.4#803005)

Reply via email to