unbridled-41 commented on PR #4833:
URL: 
https://github.com/apache/rocketmq-dashboard/pull/4833#issuecomment-5770426024

   Evidence-chain verification pass (self-review), with a follow-up test commit 
`72d17841`:
   
   - **Gap found and closed:** the original regression test switched the page 
size from page 1, where the pre-fix handler and the fixed handler record the 
same request — so it could not actually fail on the bug. The reworked test 
walks to **page 3** of a 45-row / 3-page mock first, then switches the size 
changer to 50/page. The mock serves rows per requested page, so the assertions 
are meaningful:
     - the follow-up request must carry `page: 1, pageSize: 50` (the pre-fix 
handler records `page: 3`),
     - page 1's rows (`Delivery 1`) are visible again after the reset.
   - **Pre-fix failure re-verified:** with the handler reverted to 
`setPage(nextPage); setPageSize(nextPageSize);` (the `origin/rocketmq-studio` 
state), the reworked test fails its `toHaveBeenLastCalledWith({ page: 1, 
pageSize: 50 })` assertion; it passes against this branch's fix. Exact request 
sequences recorded via a probe: pre-fix `[{1,20},{3,20},{1,50}...]` — wait, the 
corrected sequence on the pre-fix code is `[{1,20},{3,20},{3,50}]` (the stale 
page is re-requested with the new size), versus `[{1,20},{3,20},{1,50}]` on the 
fixed code.
   - Suite: `npx vitest run 
src/pages/ops/__tests__/NotificationDeliveriesPage.test.tsx` → **5 passed (5)** 
on this branch; `tsc --noEmit` clean.
   
   No further code changes needed — the component fix itself was correct; only 
the test's sensitivity to the bug needed strengthening.


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