unbridled-41 commented on PR #5447:
URL:
https://github.com/apache/rocketmq-dashboard/pull/5447#issuecomment-5965522655
### CI attribution: `Backend Tests (Java 21)` failed on a pre-existing flake
in another test class
The job ended on:
```
[ERROR]
AiRunServiceTest.stopShouldAbortALiveRunAndLeaveItStoppedWithUserStopTest:327
Expecting Optional to contain a value but it was empty.
```
This branch does not touch `AiRunService`, its test, or any AI code, and the
same assertion has been failing on other branches of this batch with unrelated
diffs. The cause is a race in the test itself: `service.stop(...)` cancels the
worker, whose own finalisation calls `registry.finish(...)` and removes the
registration, so looking the handle up again afterwards races with that
removal. Measured with a temporary probe: the registration is gone 2 ms after
the run reaches `STOPPED`.
Filed with the mechanism evidence and the fix: #5450.
Local evidence (clean checkout):
```
cd server && mvn -o test -Dtest=AiRunServiceTest
Tests run: 22, Failures: 0, Errors: 0, Skipped: 0 # 5 consecutive runs
on trunk
```
--
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]