Add missing test coverage for grails-datamapping-support and dedupe ConfigSupport usage - #16191
Open
borinquenkid wants to merge 1 commit into
Open
Add missing test coverage for grails-datamapping-support and dedupe ConfigSupport usage#16191borinquenkid wants to merge 1 commit into
borinquenkid wants to merge 1 commit into
Conversation
…onfigSupport usage Move GrailsVersionSpec to grails-datastore-core, where GrailsVersion actually lives, and make its current-version assertions hermetic instead of relying on an incidental transitive dependency on grails-bootstrap. Add specs for previously-untested classes in grails-datamapping-support: ConfigSupport, AggregatePersistenceContextInterceptor, EntityProxyHandlerAdapter, ProxyHandlerAdapter, and GormTransformer (including its @canonical rejection and getKnownEntityNames). Replace the hibernate5/hibernate7 HibernateGrailsPlugin's inlined copy of ConfigSupport.prepareConfig's config-conversion logic with a call to the shared method, removing a duplicated code fragment. Add an integration spec per module driving doWithSpring() through the real plugin-manager invocation path to verify both the Hibernate bean wiring and the config conversion. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 8.1.x #16191 +/- ##
==================================================
+ Coverage 53.4149% 53.5048% +0.0899%
- Complexity 19459 19510 +51
==================================================
Files 2081 2081
Lines 98993 98993
Branches 17361 17361
==================================================
+ Hits 52877 52966 +89
+ Misses 38566 38482 -84
+ Partials 7550 7545 -5 🚀 New features to boost your workflow:
|
✅ All tests passed ✅🏷️ Commit: fcb7ac8 Learn more about TestLens at testlens.app/docs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GrailsVersionSpectograils-datastore-core(whereGrailsVersionactually lives) and made its current-version assertions hermetic instead of relying on an incidental transitive dependency ongrails-bootstrap.grails-datamapping-support:ConfigSupport,AggregatePersistenceContextInterceptor,EntityProxyHandlerAdapter,ProxyHandlerAdapter, andGormTransformer(including its@Canonicalrejection andgetKnownEntityNames).HibernateGrailsPlugin's inlined copy ofConfigSupport.prepareConfig's config-conversion logic with a call to the shared method, removing a duplicated code fragment (both plugins already depend ongrails-datamapping-support).doWithSpring()through the real plugin-manager invocation path (DefaultGrailsPlugin.doWithRuntimeConfiguration+ merging into a realApplicationContext) to verify both the Hibernate bean wiring and the config conversion end-to-end.Test plan
./gradlew :grails-datamapping-support:test- all specs pass./gradlew :grails-datastore-core:test- movedGrailsVersionSpecpasses hermetically./gradlew :grails-data-hibernate5:test :grails-data-hibernate7:test- full suites pass including newHibernateGrailsPluginSpec./gradlew :grails-datamapping-support:codeStyle :grails-datastore-core:codeStyle :grails-data-hibernate5:codeStyle :grails-data-hibernate7:codeStyle- clean🤖 Generated with Claude Code