unbridled-41 commented on PR #4605:
URL:
https://github.com/apache/rocketmq-dashboard/pull/4605#issuecomment-5749650931
## Verification evidence
**CI (this head SHA)** — `bf7d80e7af75273b54778eeba842ca34140dc9d9`: exactly
one `CI` (`pull_request`) run, id `35507319061`, `status=completed`,
`conclusion=startup_failure`; `check-runs=0`; combined status `state=pending,
count=0`. Repo-wide condition: every recent `pull_request` run is
`startup_failure`, including other contributors' PRs.
**Red before the fix** — provider restored from `origin/master` with the new
tests kept:
```
SPRING_PROFILES_ACTIVE=dev mvn -o
-Dtest='RocketMQMessageProviderTest#directlyConsumesMessageReportsAnOfflineClientAsNotFound'
test
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
java.lang.AssertionError:
Expecting actual throwable to be an instance of:
org.apache.rocketmq.studio.common.exception.BusinessException
but was:
org.apache.rocketmq.client.exception.MQClientException: CODE: 1 DESC: The
Consumer billing client-offline not online
For more information, please visit the url,
https://rocketmq.apache.org/docs/bestPractice/06FAQ
at
org.apache.rocketmq.tools.admin.DefaultMQAdminExt.consumeMessageDirectly(DefaultMQAdminExt.java:605)
at
org.apache.rocketmq.studio.provider.apache.RocketMQMessageProvider.lambda$consumeMessageDirectly$5(RocketMQMessageProvider.java:500)
```
That raw client exception is what `MqAdminExtFactory` wrapped into `502
"RocketMQ admin call failed: " + rootMessage` before this change.
**Module tests (green)**
```
SPRING_PROFILES_ACTIVE=dev mvn -o
-Dtest='RocketMQMessageProviderTest,MessageServiceTest,MessageControllerTest'
test
Tests run: 56, Failures: 0, Errors: 0, Skipped: 0 --
RocketMQMessageProviderTest (54 pre-existing + 2 new)
Tests run: 19, Failures: 0, Errors: 0, Skipped: 0 -- MessageServiceTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0 -- MessageControllerTest
```
`mvn -o checkstyle:check`: clean.
**Full backend suite** — `cd server && SPRING_PROFILES_ACTIVE=dev mvn -o
test` on this branch:
```
Tests run: 2416, Failures: 0, Errors: 0, Skipped: 0
BUILD SUCCESS
```
2416 = the pristine `origin/master` baseline recorded for this suite (2414)
plus the two tests added here, with zero failures. A `BUILD SUCCESS` on the
default `test` phase also covers the `backend-build` job's compile step.
**Web suite** — not affected (this PR changes only `server/`), but recorded
for completeness: `npx vitest run --maxWorkers=4` on this branch → `Tests 1033
passed | 1 failed (1034)`, the single failure being the load-sensitive
`ConsumerPage > keeps the latest client stack when an older request resolves
last`, which also fails with the file restored from `origin/master` under the
same load.
**Diff self-check** — `git diff --numstat origin/master` → `24/3
server/src/main/java/org/apache/rocketmq/studio/provider/apache/RocketMQMessageProvider.java`,
`37/0
server/src/test/java/org/apache/rocketmq/studio/provider/apache/RocketMQMessageProviderTest.java`
(2 files, net +61/−3). The `−3` are the three lines of the original unguarded
call replaced by the graded `try/catch` plus the helper extracted at the bottom
of the file.
--
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]