You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tr...@apache.org on 2020/11/11 09:50:19 UTC
[flink] branch release-1.10 updated: [FLINK-20076][runtime][test]
Fixed DispatcherTest.testOnRemovedJobGraphDoesNotCleanUpHAFiles.
This is an automated email from the ASF dual-hosted git repository.
trohrmann pushed a commit to branch release-1.10
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.10 by this push:
new fd624ce [FLINK-20076][runtime][test] Fixed DispatcherTest.testOnRemovedJobGraphDoesNotCleanUpHAFiles.
fd624ce is described below
commit fd624ce133fea2f30781fd855a8ab3a2b1840627
Author: Matthias Pohl <ma...@ververica.com>
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 3040cfb..5c6bbd0 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
@@ -595,9 +595,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))
@@ -609,6 +613,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.");