You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "yyqdbngt (via GitHub)" <gi...@apache.org> on 2026/09/05 12:55:14 UTC

[PR] test(alert): cover ActiveAlertState validation and labels [rocketmq-dashboard]

yyqdbngt opened a new pull request, #3324:
URL: https://github.com/apache/rocketmq-dashboard/pull/3324

   ## Summary
   
   Adds `ActiveAlertStateTest`, a first unit test for the record holding the persisted active state plus labels needed to emit a lifecycle recovery event.
   
   Coverage:
   - required-field validation: null key/state fail fast with NPEs and a blank instance id is rejected with `IllegalArgumentException`;
   - labels are defensively copied into an unmodifiable snapshot (source mutation does not leak), and null labels normalize to an empty map;
   - the key, state, instance id, and labels are all exposed.
   
   ## Why
   
   The record is what the state machine hands over for recovery-event emission; its validation and label snapshot semantics had no direct test.
   
   ## Testing
   
   `mvn -B test -Dtest=ActiveAlertStateTest` — 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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(alert): cover ActiveAlertState validation and labels [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed pull request #3324: test(alert): cover ActiveAlertState validation and labels
URL: https://github.com/apache/rocketmq-dashboard/pull/3324


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org