From b0163abe1a687066f69ae2c196565470fe469499 Mon Sep 17 00:00:00 2001 From: davidradl Date: Wed, 29 Oct 2025 13:27:29 +0000 Subject: [PATCH 1/2] [FLINK-38536] Add debugging for test failure Signed-off-by: davidradl --- .../runtime/executiongraph/FinalizeOnMasterTest.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/FinalizeOnMasterTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/FinalizeOnMasterTest.java index 5b7e1586ea814..2832858a3e2cf 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/FinalizeOnMasterTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/FinalizeOnMasterTest.java @@ -20,6 +20,7 @@ import org.apache.flink.api.common.JobStatus; import org.apache.flink.runtime.concurrent.ComponentMainThreadExecutorServiceAdapter; +import org.apache.flink.runtime.io.disk.iomanager.AsynchronousFileIOChannelTest; import org.apache.flink.runtime.jobgraph.JobGraphTestUtils; import org.apache.flink.runtime.jobgraph.JobVertex; import org.apache.flink.runtime.jobgraph.JobVertex.FinalizeOnMasterContext; @@ -30,6 +31,8 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.util.concurrent.ScheduledExecutorService; @@ -45,6 +48,7 @@ * only when the execution graph reaches the successful final state. */ class FinalizeOnMasterTest { + private static final Logger LOG = LoggerFactory.getLogger(FinalizeOnMasterTest.class); @RegisterExtension static final TestExecutorExtension EXECUTOR_RESOURCE = @@ -68,7 +72,11 @@ void testFinalizeIsCalledUponSuccess() throws Exception { scheduler.startScheduling(); final ExecutionGraph eg = scheduler.getExecutionGraph(); - + if (!eg.getState().equals(JobStatus.RUNNING)) { + ErrorInfo ei = eg.getFailureInfo(); + LOG.info("Unexpected state found: Exception as string " + ei.getExceptionAsString()); + LOG.info("Unexpected state found: ErrorInfo as string " + ei); + } assertThat(eg.getState()).isEqualTo(JobStatus.RUNNING); ExecutionGraphTestUtils.switchAllVerticesToRunning(eg); From ade0be95ef31037df5997564d8600c72d45abb67 Mon Sep 17 00:00:00 2001 From: davidradl Date: Wed, 29 Oct 2025 15:43:26 +0000 Subject: [PATCH 2/2] [FLINK-38536] fix spotless Signed-off-by: davidradl --- .../flink/runtime/executiongraph/FinalizeOnMasterTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/FinalizeOnMasterTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/FinalizeOnMasterTest.java index 2832858a3e2cf..9a2066fdfd0bb 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/FinalizeOnMasterTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/FinalizeOnMasterTest.java @@ -20,7 +20,6 @@ import org.apache.flink.api.common.JobStatus; import org.apache.flink.runtime.concurrent.ComponentMainThreadExecutorServiceAdapter; -import org.apache.flink.runtime.io.disk.iomanager.AsynchronousFileIOChannelTest; import org.apache.flink.runtime.jobgraph.JobGraphTestUtils; import org.apache.flink.runtime.jobgraph.JobVertex; import org.apache.flink.runtime.jobgraph.JobVertex.FinalizeOnMasterContext;