dmvk commented on a change in pull request #17693:
URL: https://github.com/apache/flink/pull/17693#discussion_r755348298



##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/adaptive/AdaptiveSchedulerTest.java
##########
@@ -1002,6 +1007,72 @@ public void 
testComputeVertexParallelismStoreForExecutionInDefaultMode() {
         }
     }
 
+    @Test
+    public void testCheckpointCleanerIsClosedAfterCheckpointServices() throws 
Exception {
+        final JobGraph jobGraph = createJobGraph();
+        enableCheckpointing(jobGraph);
+        final CountDownLatch checkpointServicesShutdownBlocked = new 
CountDownLatch(1);
+        final CountDownLatch cleanerClosed = new CountDownLatch(1);
+        final ScheduledExecutorService executorService =
+                Executors.newSingleThreadScheduledExecutor();
+        final CompletedCheckpointStore completedCheckpointStore =
+                new StandaloneCompletedCheckpointStore(1) {
+
+                    @Override
+                    public void shutdown(JobStatus jobStatus, 
CheckpointsCleaner checkpointsCleaner)
+                            throws Exception {
+                        checkpointServicesShutdownBlocked.await();
+                        super.shutdown(jobStatus, checkpointsCleaner);
+                    }
+                };
+        final CheckpointIDCounter checkpointIDCounter =
+                new StandaloneCheckpointIDCounter() {
+
+                    @Override
+                    public void shutdown(JobStatus jobStatus) throws Exception 
{
+                        checkpointServicesShutdownBlocked.await();
+                        super.shutdown(jobStatus);
+                    }
+                };

Review comment:
       I've created a static version of the test in `DefaultSchedulerTest` so 
it can be reused.




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