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 2021/02/20 10:54:52 UTC
[flink] 01/04: [hotfix][runtime] Fixes ArchivedExecutionGraphTest
This is an automated email from the ASF dual-hosted git repository.
trohrmann pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
commit a502892ac2aaace62d2a65f5bff36c04b878e816
Author: Matthias Pohl <ma...@ververica.com>
AuthorDate: Wed Feb 3 21:17:34 2021 +0100
[hotfix][runtime] Fixes ArchivedExecutionGraphTest
The previously used globalFailure only set the failureInfo on a ExecutionGraph-
level. I switched to updateTaskExecutionState which will also set the
failureInfo on an Execution-level
---
.../runtime/executiongraph/ArchivedExecutionGraphTest.java | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ArchivedExecutionGraphTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ArchivedExecutionGraphTest.java
index a96a147..60a0aec 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ArchivedExecutionGraphTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ArchivedExecutionGraphTest.java
@@ -38,6 +38,7 @@ import org.apache.flink.runtime.jobgraph.tasks.CheckpointCoordinatorConfiguratio
import org.apache.flink.runtime.jobgraph.tasks.JobCheckpointingSettings;
import org.apache.flink.runtime.scheduler.SchedulerBase;
import org.apache.flink.runtime.scheduler.SchedulerTestingUtils;
+import org.apache.flink.runtime.taskmanager.TaskExecutionState;
import org.apache.flink.util.OptionalFailure;
import org.apache.flink.util.SerializedValue;
import org.apache.flink.util.TestLogger;
@@ -115,8 +116,17 @@ public class ArchivedExecutionGraphTest extends TestLogger {
runtimeGraph = scheduler.getExecutionGraph();
scheduler.startScheduling();
- scheduler.handleGlobalFailure(
- new RuntimeException("This exception was thrown on purpose."));
+ scheduler.updateTaskExecutionState(
+ new TaskExecutionState(
+ jobGraph.getJobID(),
+ runtimeGraph
+ .getAllExecutionVertices()
+ .iterator()
+ .next()
+ .getCurrentExecutionAttempt()
+ .getAttemptId(),
+ ExecutionState.FAILED,
+ new RuntimeException("Local failure")));
}
@Test