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

   ### Problem
   
   `TopicUpdateToolHandler` — the `rmq.topic.update` mutation tool — had **no 
test**.
   
   ### Change
   
   Add `TopicUpdateToolHandlerTest` with six tests:
   
   | Contract | Pinned behaviour |
   | --- | --- |
   | upsert | execute on an **absent** topic takes the create path with 
creation defaults (`createTopic`, never `updateTopic`); execute on an existing 
topic takes the update path with a **sparse merge** — a one-field input updates 
that field and leaves type, perm, readQueues and remark untouched (captured on 
the argument handed to `updateTopic`) |
   | preview | an absent topic has **no before state** (an empty plan state, 
not null) and no warning; an **identical** configuration warns that it already 
matches; a sparse input merges onto the current state while keeping the current 
type/perm/remark in the after state — **not the creation defaults** |
   | identity | the tool name and input type round-trip |
   
   ### Verification
   
   - New tests: **6/6 green** against unmodified code.
   - Discriminating mutations on the handler (build result verified): the 
absent-topic create path dropped (**red**); the identical-config warning 
dropped (**red**); the preview merge replaced with creation defaults (**red 
after strengthening** — the first draft asserted only the queue count, which 
the creation defaults happen to reproduce); the execute merge replaced with 
creation defaults (**red**); the preview before-state dropped (**red**).
   - Restored: 6/6 green. No product code changed.


-- 
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]

Reply via email to