This is an automated email from the ASF dual-hosted git repository.

trohrmann pushed a commit to branch release-1.11
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/release-1.11 by this push:
     new 5f1e665  [FLINK-20076][runtime][test] Fixed 
DispatcherTest.testOnRemovedJobGraphDoesNotCleanUpHAFiles.
5f1e665 is described below

commit 5f1e6654330a29013ef9c940ef1b799e82d3c228
Author: Matthias Pohl <[email protected]>
AuthorDate: Tue Nov 10 13:56:01 2020 +0100

    [FLINK-20076][runtime][test] Fixed 
DispatcherTest.testOnRemovedJobGraphDoesNotCleanUpHAFiles.
    
    We missed starting the JobGraphStore which caused an exception and 
prevented us testing the actual behavior even though the test succeeded.
    
    This closes #14019.
---
 .../java/org/apache/flink/runtime/dispatcher/DispatcherTest.java    | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git 
a/flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherTest.java
 
b/flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherTest.java
index 1ffaf86..c618bfe 100755
--- 
a/flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherTest.java
+++ 
b/flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherTest.java
@@ -603,9 +603,13 @@ public class DispatcherTest extends TestLogger {
        @Test
        public void testOnRemovedJobGraphDoesNotCleanUpHAFiles() throws 
Exception {
                final CompletableFuture<JobID> removeJobGraphFuture = new 
CompletableFuture<>();
+               final CompletableFuture<JobID> releaseJobGraphFuture = new 
CompletableFuture<>();
+
                final TestingJobGraphStore testingJobGraphStore = 
TestingJobGraphStore.newBuilder()
                        
.setRemoveJobGraphConsumer(removeJobGraphFuture::complete)
+                       
.setReleaseJobGraphConsumer(releaseJobGraphFuture::complete)
                        .build();
+               testingJobGraphStore.start(null);
 
                dispatcher = new TestingDispatcherBuilder()
                        .setInitialJobGraphs(Collections.singleton(jobGraph))
@@ -617,6 +621,8 @@ public class DispatcherTest extends TestLogger {
 
                processFuture.join();
 
+               assertThat(releaseJobGraphFuture.get(), 
is(jobGraph.getJobID()));
+
                try {
                        removeJobGraphFuture.get(10L, TimeUnit.MILLISECONDS);
                        fail("onRemovedJobGraph should not remove the job from 
the JobGraphStore.");

Reply via email to