protected JobGraph createJobGraph(
      MixedFormatTableLoader tableLoader, TableSchema tableSchema, boolean triggerFailover) {
    StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
    Configuration config = new Configuration();
    config.set(ExecutionOptions.RUNTIME_MODE, RuntimeExecutionMode.STREAMING);
    env.configure(config, getClass().getClassLoader());

    env.enableCheckpointing(10, CheckpointingMode.EXACTLY_ONCE);

    if (triggerFailover) {
      env.setRestartStrategy(RestartStrategies.fixedDelayRestart(1, Time.milliseconds(100)));
    } else {
      env.setRestartStrategy(RestartStrategies.noRestart());
    }

    DataStreamSource<RowData> source =
        env.addSource(new StreamingExecutionTestSource(latchId, NUM_RECORDS, triggerFailover))
            .setParallelism(4);
    MixedTable table = MixedFormatUtils.loadMixedTable(tableLoader);
    FlinkSink.forRowData(source)
        .context(Optional::of)
        .table(table)
        .tableLoader(tableLoader)
        .flinkSchema(tableSchema)
        .build();

    StreamGraph streamGraph = env.getStreamGraph();
    return streamGraph.getJobGraph();
  }
Whether the test is executing in a scenario that induces a failover. This doesn't mean that
this source induces the failover.
amoro-format-mixed/amoro-mixed-flink/amoro-mixed-flink-common/src/test/java/org/apache/amoro/flink/write/MixedFormatFileWriterITCase.java