yyqdbngt opened a new pull request, #3240: URL: https://github.com/apache/rocketmq-dashboard/pull/3240
## Summary Adds `SocketProxyHealthProbeTest`, a first unit test for `SocketProxyHealthProbe`, the plain-TCP proxy health probe used by `ProxyAddressService#buildTopology()` to decide whether a proxy node is up. The probe is exercised against a real loopback socket rather than mocked, so the actual connect/refused path is verified. Coverage: - reachable: listening loopback `ServerSocket` is reported reachable with a non-negative latency; - unreachable: a just-closed port is reported unreachable with latency `-1`; - `ProbeResult` factories: `reachable()` clamps a negative measured latency to `0`, `unreachable()` carries `reachable=false, latencyMs=-1`. ## Why `SocketProxyHealthProbe` is the default production `ProxyHealthProbe` and feeds proxy up/down state into the cluster topology; it had no direct test (existing tests only mock the interface). ## Testing `mvn -B test -Dtest=SocketProxyHealthProbeTest` — 3/3 pass; checkstyle (validate) 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]
