wanglijie95 commented on code in PR #23694:
URL: https://github.com/apache/flink/pull/23694#discussion_r1427580681


##########
flink-kubernetes/src/test/java/org/apache/flink/kubernetes/kubeclient/decorators/InitTaskManagerDecoratorTest.java:
##########
@@ -282,12 +282,22 @@ void testNodeAffinity() {
         assertThat(nodeSelectorTerms.size()).isEqualTo(1);
 
         List<NodeSelectorRequirement> requirements = 
nodeSelectorTerms.get(0).getMatchExpressions();
-        assertThat(requirements)
-                .containsExactlyInAnyOrder(
+        for (int i = 0; i < requirements.size(); i++) {

Review Comment:
   Hi @yijut2, I think we simply change the logic as follows:
   ```
           assertThat(requirements).hasSize(1);
           NodeSelectorRequirement requirement = requirements.get(0);
           assertThat(requirement.getKey())
                   .isEqualTo(
                           
flinkConfig.getString(KubernetesConfigOptions.KUBERNETES_NODE_NAME_LABEL));
           assertThat(requirement.getOperator()).isEqualTo("NotIn");
           assertThat(requirement.getValues())
                   
.containsExactlyInAnyOrderElementsOf(Arrays.asList("blockedNode2", 
"blockedNode1"));
   ```
   
   WDYT?



-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

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

Reply via email to