dybyte commented on PR #9815:
URL: https://github.com/apache/seatunnel/pull/9815#issuecomment-3257060272

   > I'm a little curious why it would be null.
   
   I think the NPE occurs because restoreJob executes asynchronously, and 
getJobStatus() is called inside the await() before the job is fully 
initialized. But I’m not entirely sure.
   ```java
   CompletableFuture.supplyAsync(
                   () -> {
                       try {
                           container.restoreJob(
                                   "/mysqlcdc_to_mysql_with_binlog_delete.conf",
                                   String.valueOf(jobId));
                       } catch (Exception e) {
                           log.error("Commit task exception :" + 
e.getMessage());
                           throw new RuntimeException(e);
                       }
                       return null;
                   });
           await().atMost(2, TimeUnit.MINUTES)
                   .untilAsserted(
                           () -> {
                               String jobStatus = 
container.getJobStatus(String.valueOf(jobId));
                               Assertions.assertEquals("RUNNING", jobStatus);
                           });
   ```
   
https://github.com/apache/seatunnel/blob/2653f6798efeced85cc4bb0db3fb9e181bf8bf5e/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-cdc-mysql-e2e/src/test/java/org/apache/seatunnel/connectors/seatunnel/cdc/mysql/MysqlCDCWithBinlogDeleteIT.java#L179


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to