yyqdbngt opened a new pull request, #3569:
URL: https://github.com/apache/rocketmq-dashboard/pull/3569
### Summary
Adds the first dedicated unit test suite for the
`ProxyHealthProbe.ProbeResult` record, the outcome type of the TCP reachability
probes that drive proxy topology building.
The record exposes the `unreachable()` and `reachable(latencyMs)` factories;
the latter clamps negative latencies to zero. The tests pin the factory
contracts, the clamping and record equality.
### Changes
-
`server/src/test/java/org/apache/rocketmq/studio/cluster/proxy/ProxyHealthProbeTest.java`
- `unreachableOutcomeCarriesNegativeLatency`: unreachable probes report -1
ms.
- `reachableOutcomeKeepsPositiveLatency` /
`reachableOutcomeKeepsZeroLatency`: real latencies pass through.
- `reachableOutcomeClampsNegativeLatencyToZero`: impossible negative
values are clamped.
- `equalityFollowsRecordComponents`: same reachability and latency compare
equal, different ones do not.
### Testing
- `mvn -B test -Dtest=ProxyHealthProbeTest` passes (5 tests, all green).
--
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]