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

   ### Follow-up: test gap closed by `b0ec04b1`
   
   The verification comment above listed one coverage gap — "the profile-panel 
load order and the
   history entry a re-run appends" were not asserted on the range-change path. 
The first of those is
   closed by a second, test-only commit on this branch:
   
   - `b0ec04b1 test(metrics): pin that the custom re-run leaves the panel flow 
alone` extends the
     regression test so that after the range change **both** flows must publish 
their own result
     (`77 messages/s` from a profile panel, `cluster=prod / query=custom` from 
the custom panel), with
     the two mocked payloads distinguished by their values.
   
   This is the cross-flow invariant of #3304 (fixed by #3299): the added call 
sits beside `loadAll`, so
   the two flows must keep their own request generations (`panelRequestIdRef` / 
`customRequestIdRef` in
   `MetricsExplorer.tsx`). The assertion is not vacuous — simulating that 
freeze by letting
   `runCustomQuery` also bump `panelRequestIdRef` makes it fail, while the 
branch as written passes:
   
   ```
   $ npx vitest run src/components/__tests__/MetricsExplorer.test.tsx -t 
"re-runs the committed custom query when the range changes"
   # with the simulated shared generation:
        × re-runs the committed custom query when the range changes
   TestingLibraryElementError: Unable to find an element with the text: 77 
messages/s.
         Tests  1 failed | 29 skipped (30)
   # branch as written:
        ✓ re-runs the committed custom query when the range changes
         Tests  1 passed | 29 skipped (30)
   ```
   
   Re-run of the whole file and the checks on the updated branch:
   
   ```
   $ npx vitest run src/components/__tests__/MetricsExplorer.test.tsx
    Test Files  1 passed (1)
         Tests  30 passed (30)
   
   $ npx tsc -b && npx eslint src/components/__tests__/MetricsExplorer.test.tsx
   (no output, exit 0)
   ```
   
   Still not covered, deliberately: the history entry that a re-run appends 
(unchanged by this fix; the
   refresh path appends one the same way).
   


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