[ https://issues.apache.org/jira/browse/FLINK-33509?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated FLINK-33509: ----------------------------------- Labels: pull-request-available (was: ) > flaky test testNodeAffinity() in InitTaskManagerDecoratorTest.java > ------------------------------------------------------------------ > > Key: FLINK-33509 > URL: https://issues.apache.org/jira/browse/FLINK-33509 > Project: Flink > Issue Type: Bug > Environment: Java 11 > Reporter: Ruby > Priority: Major > Labels: pull-request-available > > When applying Nondex to the test, the NodeSelectorRequirement object shows > nondeterminism. When testing, we assume that requirement would be equal to > expected_requirement, both of them are the instance of > NodeSelectorRequirement object. The NodeSelectorRequirement object has three > attributes, including key, operator, and values list. It is possible to > get values list's elements in order `[blockedNode1, blockedNode2]`, while the > expected result is `[blockedNode2, blockedNode1]` which is incorrect. > > The root cause appeared in line 56 of `KubernetesTaskManagerTestBase.java`. > (flink-kubernetes/src/test/java/org/apache/flink/kubernetes/kubeclient/KubernetesTaskManagerTestBase.java) > Here we define `BLOCKED_NODES` as a new `hashSet`. In > `InitTaskManagerDecoratorTest.java`, when initializing the > `expected_requirement` in the test, the values being passed was > this`BLOCKED_NODES`, which is an **unordered Set**. Later, the code convert > this **hashSet** into **arrayList**, which led to the unstable result of the > values list. -- This message was sent by Atlassian Jira (v8.20.10#820010)