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

   ## Verification evidence
   
   **CI**: upstream CI cannot run here. Head commit 
`987003b2bc5e9cf9775de630467a7f5bc5e014e7`: `commits/{sha}/check-runs` → 
`total_count: 0`, `commits/{sha}/status` → 0 statuses (no workflow started for 
this head); recent `rocketmq-studio` base-branch runs are `startup_failure`, 
pre-existing and unrelated.
   
   **Red light (before the fix)** — `mvn -B -ntp test 
-Dtest='QueryHistoryServiceTest'`:
   
   ```
   
QueryHistoryServiceTest.getMessageQueryResultsHidesRecordsOwnedByOtherUsers:283 
FAILURE
     (foreign-owned record — owner "bob", current user "alice" — was returned 
instead of 404)
   
QueryHistoryServiceTest.getMessageQueryResultsScopesTheReadToTheAuthenticatedOwner:297
 ERROR
     » Business Query history record not found
   Tests run: 12, Failures: 1, Errors: 1
   ```
   
   The first failure reproduces the defect (no ownership check); the second 
fails because the current implementation never issues the owner-scoped read the 
test asserts — both turn green with the fix.
   
   **Green light / module tests (after the fix)**: QueryHistoryServiceTest 
`Tests run: 12, Failures: 0, Errors: 0` (10 pre-existing + 2 new, including the 
owner-scoped wrapper `getCustomSqlSegment().contains("queried_by")` assertion 
mirroring the existing captor pattern) and QueryHistoryControllerTest `Tests 
run: 4, Failures: 0`.
   
   **Full suite + baseline**: `mvn -B -ntp test` → `Tests run: 2037, Failures: 
3` — exactly the pristine-baseline set (AuthCorsIntegrationTest ×2, 
AliyunInstanceProviderTest ×1, identical messages). Zero new failures; 2035 
baseline + 2 new tests = 2037.
   
   **Build**: compile clean; `BUILD FAILURE` in the full run is solely the 
pre-existing baseline test failures.
   
   **Diff self-check**: 2 files, +44/−2 — `QueryHistoryService.java` (+8/−2: 
owner-scoped read) and `QueryHistoryServiceTest.java` (+38: 2 regression tests 
+ imports). No unrelated changes.


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