KevinyhZou commented on code in PR #13409:
URL: https://github.com/apache/gluten/pull/13409#discussion_r4475573510
##########
gluten-flink/ut/src/test/java/org/apache/gluten/table/runtime/stream/custom/NexmarkTest.java:
##########
@@ -419,15 +523,32 @@ private boolean checkJobRunningStatus(TableResult result,
long timeoutMs)
if (jobClient.getJobStatus().complete(JobStatus.RUNNING)) {
jobClient.cancel();
return true;
- } else {
- Thread.sleep(1000);
}
+ if (jobClient.getJobStatus().complete(JobStatus.FAILED)) {
Review Comment:
`getJobStatus()` returns a `CompletableFuture<JobStatus>`. Calling
`complete(JobStatus.FAILED)` attempts to set its result and returns whether
that attempt succeeded; it does not check whether the job failed. Consequently
this branch may never run for an already completed status future, or may report
a false failure if the future is still pending. The `RUNNING` check above has
the same issue. Please read the status (for example, `get()` or `join()`) and
compare it with `JobStatus.RUNNING` / `JobStatus.FAILED`.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]