[ 
https://issues.apache.org/jira/browse/FLINK-16409?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

testfixer0 updated FLINK-16409:
-------------------------------
    Description: 
Test `testKeyedMapStateUpgrade` depends on `put` in `HeapMapState.java` and 
`deserialize` in `MapSerializer.java`. It has this following test assertion 
`assertEquals((Integer) 1, actual.getKey());` that asserts the `getKey()` value 
of `actual`. However the `HashMap` in `put` and `deserialize` does not 
guarantee any specific order of entries. Therefore, the assertion will fail if 
the order is different.

 

This PR proposes to use `LinkedHashMap` for a deterministic order. Please let 
me know if you want to discuss the changes more.

  was:Test `testKeyedMapStateUpgrade` depends on `put` in `HeapMapState.java` 
and `deserialize` in `MapSerializer.java`. It has this following test assertion 
`assertEquals((Integer) 1, actual.getKey());` that asserts the `getKey()` value 
of `actual`. However the `HashMap` in `put` and `deserialize` does not 
guarantee any specific order of entries. Therefore, the assertion will fail if 
the order is different.


> Use LinkedHashMap for deterministic iterations
> ----------------------------------------------
>
>                 Key: FLINK-16409
>                 URL: https://issues.apache.org/jira/browse/FLINK-16409
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / Task
>            Reporter: testfixer0
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.10.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Test `testKeyedMapStateUpgrade` depends on `put` in `HeapMapState.java` and 
> `deserialize` in `MapSerializer.java`. It has this following test assertion 
> `assertEquals((Integer) 1, actual.getKey());` that asserts the `getKey()` 
> value of `actual`. However the `HashMap` in `put` and `deserialize` does not 
> guarantee any specific order of entries. Therefore, the assertion will fail 
> if the order is different.
>  
> This PR proposes to use `LinkedHashMap` for a deterministic order. Please let 
> me know if you want to discuss the changes more.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to