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

   ### Which Issue(s) This PR Fixes
   
   - Fixes #5131
   
   ### Brief Description
   
   Quote the `value` column in the `RmqMetricSnapshot` MyBatis-Plus mapping. H2 
treats `VALUE` as a reserved keyword, so the unquoted column prevented metric 
snapshots from being saved. Add an H2 integration test that saves two snapshots 
and reads their values back.
   
   ### How Did You Test This Change?
   
   Using Maven 3.9.9 and JDK 21 from `server/`:
   
   - Before the fix, the new test failed with H2 SQL error `[42001-240]` on the 
unquoted `value` column.
   - `mvn.cmd -q 
-Dtest=MybatisPlusMetricSnapshotRepositoryTest,MybatisPlusMetricSnapshotRepositoryIntegrationTest
 test` — 3 tests passed.
   - `mvn.cmd -q checkstyle:check` — passed.
   - `mvn.cmd -q -DskipTests compile` — passed.
   - `mvn.cmd -q test` — 3288 tests ran; 8 failures and 26 errors. Observed 
environment-related causes include local MySQL authentication failure and 
Windows not finding `sh`. The new H2 test passed.
   - `mvn.cmd -q -DskipTests package` — stopped at the binary license check 
because Windows CMD could not find `python3`.
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in
   - [x] Commit subject follows Conventional Commits (`fix(metrics): ...`)
   - [x] Regression test added; its method name ends in `Test`
   - [x] No new UI text
   - [ ] Full architecture checks could not be confirmed because the full test 
run had the failures described above
   - [x] New test file carries the ASF license header
   - [x] No documentation update needed for this H2 column-mapping fix


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