yyqdbngt opened a new pull request, #3245: URL: https://github.com/apache/rocketmq-dashboard/pull/3245
## Summary Adds `AlertCorrelationScopeTest`, a first unit test for the package-private correlation matcher shared by cross-domain alert handling. Pure static matching, no mocks. Coverage: - alerts without a (textual) source instance id never match; - instance ids must agree — the source side is trimmed before comparison while the candidate side is matched as-is; - a resource label (`brokerName`/`brokerAddr`/`clusterName`/`clusterId`) only constrains the match when both sides declare it; a conflict on any shared label rejects the pair; - label values are compared after trimming, and whitespace-only values count as absent. ## Why The scope matcher decides which alerts belong to the same instance/resource correlation window; its matching semantics had no direct test. ## Testing `mvn -B test -Dtest=AlertCorrelationScopeTest` — 4/4 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]
