2020
2121import org .apache .flink .api .common .JobStatus ;
2222import org .apache .flink .runtime .concurrent .ComponentMainThreadExecutorServiceAdapter ;
23+ import org .apache .flink .runtime .io .disk .iomanager .AsynchronousFileIOChannelTest ;
2324import org .apache .flink .runtime .jobgraph .JobGraphTestUtils ;
2425import org .apache .flink .runtime .jobgraph .JobVertex ;
2526import org .apache .flink .runtime .jobgraph .JobVertex .FinalizeOnMasterContext ;
3031
3132import org .junit .jupiter .api .Test ;
3233import org .junit .jupiter .api .extension .RegisterExtension ;
34+ import org .slf4j .Logger ;
35+ import org .slf4j .LoggerFactory ;
3336
3437import java .util .concurrent .ScheduledExecutorService ;
3538
4548 * only when the execution graph reaches the successful final state.
4649 */
4750class FinalizeOnMasterTest {
51+ private static final Logger LOG = LoggerFactory .getLogger (FinalizeOnMasterTest .class );
4852
4953 @ RegisterExtension
5054 static final TestExecutorExtension <ScheduledExecutorService > EXECUTOR_RESOURCE =
@@ -68,7 +72,11 @@ void testFinalizeIsCalledUponSuccess() throws Exception {
6872 scheduler .startScheduling ();
6973
7074 final ExecutionGraph eg = scheduler .getExecutionGraph ();
71-
75+ if (!eg .getState ().equals (JobStatus .RUNNING )) {
76+ ErrorInfo ei = eg .getFailureInfo ();
77+ LOG .info ("Unexpected state found: Exception as string " + ei .getExceptionAsString ());
78+ LOG .info ("Unexpected state found: ErrorInfo as string " + ei );
79+ }
7280 assertThat (eg .getState ()).isEqualTo (JobStatus .RUNNING );
7381
7482 ExecutionGraphTestUtils .switchAllVerticesToRunning (eg );
0 commit comments