Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5764#discussion_r177319256
  
    --- Diff: 
flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherTest.java
 ---
    @@ -344,6 +363,42 @@ public void testJobRecovery() throws Exception {
                assertThat(jobIds, contains(jobGraph.getJobID()));
        }
     
    +   /**
    +    * Tests that we can dispose a savepoint.
    +    */
    +   @Test
    +   public void testSavepointDisposal() throws Exception {
    +           final DispatcherGateway dispatcherGateway = 
dispatcher.getSelfGateway(DispatcherGateway.class);
    +
    +           
dispatcherLeaderElectionService.isLeader(UUID.randomUUID()).get();
    +
    +           final URI externalPointer = createTestingSavepoint();
    +           final Path savepointPath = Paths.get(externalPointer);
    +
    +           assertThat(Files.exists(savepointPath), is(true));
    +
    +           dispatcherGateway.disposeSavepoint(externalPointer.toString(), 
TIMEOUT).get();
    +
    +           assertThat(Files.exists(savepointPath), is(false));
    +   }
    +
    +   @Nonnull
    +   public URI createTestingSavepoint() throws IOException, 
URISyntaxException {
    --- End diff --
    
    Will do


---

Reply via email to