jinxing64 commented on a change in pull request #16118:
URL: https://github.com/apache/flink/pull/16118#discussion_r670467100



##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/JobMasterPartitionTrackerImplTest.java
##########
@@ -240,54 +245,120 @@ public void testReleaseOrPromote() {
                                         createTaskExecutorGateway(
                                                 resourceId, 
taskExecutorReleaseCalls)));
 
+        final ResourceID taskExecutorId = ResourceID.generate();
+        final ResultPartitionID resultPartitionId1 = new ResultPartitionID();
+        final ResultPartitionID resultPartitionId2 = new ResultPartitionID();
+
+        partitionTracker.startTrackingPartition(
+                taskExecutorId,
+                
AbstractPartitionTrackerTest.createResultPartitionDeploymentDescriptor(
+                        resultPartitionId1, true));
+
+        partitionTracker.startTrackingPartition(
+                taskExecutorId,
+                
AbstractPartitionTrackerTest.createResultPartitionDeploymentDescriptor(
+                        resultPartitionId2, false));
+
+        assertThat(
+                partitionTracker.getAllTrackedPartitions().stream()
+                        .map(desc -> 
desc.getShuffleDescriptor().getResultPartitionID())
+                        .collect(Collectors.toList()),
+                hasItems(resultPartitionId1, resultPartitionId2));

Review comment:
       `contains` is sensitive about order; I try by `containsInAnyOrder`




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to