yyqdbngt opened a new pull request, #4071:
URL: https://github.com/apache/rocketmq-dashboard/pull/4071
Fixes #4018
## Summary
Add a regression test in `web/src/pages/cluster/clusterStats.test.ts`
covering partial cluster component counting: a cluster that carries only
proxies (empty broker and name server lists) is summarized as exactly `{
brokers: 0, nameServers: 0, proxies: 1 }`.
## Why
The existing suite only covered an empty cluster list, fully-populated
clusters across multiple entries, and null/missing component lists. Partial
inventories — some component kinds present, others empty — were not protected,
so the per-kind counting in `countClusterComponents` could regress unnoticed.
## Testing
- `cd web && ./node_modules/.bin/tsc -b tsconfig.app.json` — passes (exit 0)
- `./node_modules/.bin/vitest run src/pages/cluster/clusterStats.test.ts` —
all tests green
- `git diff --check` — clean
--
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]