zhuzhurk commented on a change in pull request #16856:
URL: https://github.com/apache/flink/pull/16856#discussion_r695571578



##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/RemoveCachedShuffleDescriptorTest.java
##########
@@ -158,25 +159,122 @@ private void testCacheRemovedCorrectlyAfterFailover(
         assertEquals(PARALLELISM, shuffleDescriptors.length);
         assertEquals(expectedBefore, blobWriter.numberOfBlobs());
 
-        triggerExceptionAndComplete(scheduler, v1);
+        triggerGlobalFailoverAndComplete(scheduler, v1);
         ioExecutor.triggerAll();
 
         // Cache should be removed during ExecutionVertex#resetForNewExecution
         assertNull(getConsumedCachedShuffleDescriptor(executionGraph, v2));
         assertEquals(expectedAfter, blobWriter.numberOfBlobs());
     }
 
-    private static DefaultScheduler createSchedulerAndDeploy(
+    @Test
+    public void testRemoveNonOffloadedCacheForPointwiseEdgeAfterFinished() 
throws Exception {
+        testRemoveCacheForPointwiseEdgeAfterFinished(
+                new TestingBlobWriter(Integer.MAX_VALUE), 0, 0);
+    }
+
+    @Test
+    public void testRemoveOffloadedCacheForPointwiseEdgeAfterFinished() throws 
Exception {
+        testRemoveCacheForPointwiseEdgeAfterFinished(new TestingBlobWriter(0), 
7, 6);

Review comment:
       It would be better to add some comments for why it is (7, 6). e.g.
   7 = 1(JobInformation) + 2(TaskInformation) + 4(ShuffleDescritptorsCache)




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