unbridled-41 commented on PR #4750:
URL:
https://github.com/apache/rocketmq-dashboard/pull/4750#issuecomment-5759954641
### Evidence added in the second commit (`efc26dc1`)
The description claims the grading moves **three** call sites; the first
commit's test covered only the list. The progress read and the subscription
read are now pinned as well, and the shared CODE 17 exception is one helper
instead of three inline copies.
**Teeth, measured against the base source** (only
`RocketMQMetadataProvider.java` reverted to `cd448e17`; the test file
untouched):
```
$ cd server && mvn -B -ntp -o test
-Dtest='RocketMQMetadataProviderTest#groupProgressShouldReportNoStatsForAGroupWithoutARetryTopicRouteTest+groupSubscriptionsShouldFallBackToTheProxyWithoutARetryTopicRouteTest+listConsumerGroupsShouldGradeAMissingRetryTopicRouteAsOfflineTest'
[ERROR] Tests run: 3, Failures: 1, Errors: 2, Skipped: 0, <<< FAILURE!
listConsumerGroupsShouldGradeAMissingRetryTopicRouteAsOfflineTest
but was: -1
groupProgressShouldReportNoStatsForAGroupWithoutARetryTopicRouteTest
BusinessException: # the 502 the fix removes
groupSubscriptionsShouldFallBackToTheProxyWithoutARetryTopicRouteTest
BusinessException:
```
Restored immediately afterwards (`git diff --stat` = the test file only),
then:
```
$ mvn -B -ntp -o test -Dtest=RocketMQMetadataProviderTest
[INFO] Tests run: 47, Failures: 0, Errors: 0, Skipped: 0 #
BUILD SUCCESS
$ mvn -B -ntp -o test
-Dtest=RocketMQMetadataProviderTest,RocketMQAdminClientImplTest,ProxyConsumerResolverTest
[INFO] Tests run: 47 + 6 + 69 = 122, Failures: 0, Errors: 0, Skipped: 0 #
BUILD SUCCESS
```
**What the two states still look like**
`listConsumerGroupsShouldMarkOnlineInstancesUnknownWhenConnectionLookupFailsTest`
(an `IllegalStateException` from the admin call) still expects `-1`, and
`getGroupSubscriptionsShouldFallBackToProxyConnectionsTest` (the pre-existing
`CONSUMER_NOT_ONLINE` case) still passes — so "graded as no live data" and
"inventory genuinely unavailable" remain distinguishable, which was the risk in
this change.
**State of this PR**
- head `efc26dc1`, 2 commits (`49c4ee1c` fix + `efc26dc1` test), base
`rocketmq-studio`, MERGEABLE/CLEAN, not merged.
- numstat: `RocketMQMetadataProvider.java +7/-0`,
`RocketMQMetadataProviderTest.java +87/-3`.
- Coverage now matches the claim: all three call sites, plus the
counter-state test for the untouched grading.
--
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]