zjncs opened a new pull request, #4135:
URL: https://github.com/apache/rocketmq-dashboard/pull/4135
## Motivation
`AliyunInstanceProviderTest.getGroupProgressShouldMapLagRowsTest` **fails on
the current rocketmq-studio HEAD**: it still expects the aggregate `total` row
alongside the per-topic rows (`assertThat(rows).hasSize(2)`), but
`AliyunConverters.toQueueProgressRows` has kept the total row only as a
fallback since #2907:
```java
// The aggregate repeats the per-topic counts. Keep it only as a fallback
when
// the API does not expose the topic breakdown, otherwise callers that sum
rows
// report the same lag twice.
if (rows.isEmpty() && totalLag != null && totalLag.getReadyCount() != null) {
```
so only 1 row is produced:
```
Expected size: 2 but was: 1 in:
[QueueProgressVO(topic=topic-a, broker=topic:topic-a, queueId=0, ...)]
```
The production change was intentional (documented in the code); the test was
simply never updated, leaving the suite red.
## Modification
- `getGroupProgressShouldMapLagRowsTest` now asserts the current contract:
with a topic breakdown only the per-topic rows are returned (and explicitly no
`total` row).
- Adds the previously missing fallback case: without a topic breakdown a
single `total` row is returned with the aggregate lag.
## Verification
fail-before (current rocketmq-studio, this test class):
```
Tests run: 27, Failures: 1
getGroupProgressShouldMapLagRowsTest <<< FAILURE!
Expected size: 2 but was: 1
```
pass-after:
```
Tests run: 27, Failures: 0, Errors: 0, Skipped: 0
BUILD SUCCESS
```
Follow-up to #2907; no associated issue — noticed while running the provider
suite.
--
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]