jamesfredley opened a new pull request, #15423:
URL: https://github.com/apache/grails-core/pull/15423

   ## Summary
   - Add unit and functional tests for `@Query`-annotated Data Service methods 
routing to non-default datasources via `@Transactional(connection)`
   - Tests cover `FindOneStringQueryImplementer`, 
`FindAllStringQueryImplementer`, and `UpdateStringQueryImplementer` - 
previously untested code paths
   - Both abstract class and interface service patterns are tested
   
   ## Changes
   - **Unit test** (`DataServiceMultiDataSourceSpec` in 
`grails-data-hibernate5-core`): 7 new tests covering `@Query` find-one, 
find-all, and update for both abstract and interface services
   - **Functional test** (`DataServiceMultiDataSourceSpec` in 
`grails-test-examples`): 4 new integration tests covering `@Query` find-one, 
find-all, and update in a full Grails application context
   
   ## Test Results
   - Unit: 23/23 pass (16 existing + 7 new)
   - Functional: 10/10 pass (6 existing + 4 new)
   - `codeStyle`: pass
   
   ## Context
   During the exhaustive bug pattern sweep for connection routing issues 
(#15395, #15416), we identified that 
`findStaticApiForConnectionId(domainClassNode, newMethodNode)` in the 3 String 
Query implementers had no test coverage for multi-datasource routing. 
Investigation confirmed the pattern works correctly via the declaring-class 
fallback in `TransactionalTransform.findTransactionalAnnotation()`, but the 
code paths lacked regression tests.


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