[
https://issues.apache.org/jira/browse/FLINK-16409?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Roman Khachatryan closed FLINK-16409.
-------------------------------------
Resolution: Won't Fix
The corresponding PR is closed:
h3. *[zentol|https://github.com/zentol]* commented [16 days
ago|https://github.com/apache/flink/pull/11287#issuecomment-593458323]
|Just like last time, we should first evaluated whether the test should be
adjusted instead.
Please discuss the issue in the JIRA, and only open a PR once you have been
assigned.|
> 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: 20m
> 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)