Skip to content

Add missing test coverage for grails-datamapping-support and dedupe ConfigSupport usage - #16191

Open
borinquenkid wants to merge 1 commit into
8.1.xfrom
chore/clean-grails-datamapping-support
Open

Add missing test coverage for grails-datamapping-support and dedupe ConfigSupport usage#16191
borinquenkid wants to merge 1 commit into
8.1.xfrom
chore/clean-grails-datamapping-support

Conversation

@borinquenkid

Copy link
Copy Markdown
Member

Summary

  • Moved GrailsVersionSpec to grails-datastore-core (where GrailsVersion actually lives) and made its current-version assertions hermetic instead of relying on an incidental transitive dependency on grails-bootstrap.
  • Added specs for previously-untested classes in grails-datamapping-support: ConfigSupport, AggregatePersistenceContextInterceptor, EntityProxyHandlerAdapter, ProxyHandlerAdapter, and GormTransformer (including its @Canonical rejection and getKnownEntityNames).
  • Replaced 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 (both plugins already depend on grails-datamapping-support).
  • Added an integration spec per hibernate module driving doWithSpring() through the real plugin-manager invocation path (DefaultGrailsPlugin.doWithRuntimeConfiguration + merging into a real ApplicationContext) 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 - moved GrailsVersionSpec passes hermetically
  • ./gradlew :grails-data-hibernate5:test :grails-data-hibernate7:test - full suites pass including new HibernateGrailsPluginSpec
  • ./gradlew :grails-datamapping-support:codeStyle :grails-datastore-core:codeStyle :grails-data-hibernate5:codeStyle :grails-data-hibernate7:codeStyle - clean

🤖 Generated with Claude Code

…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>
Copilot AI lite review requested due to automatic review settings August 21, 2026 18:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.5048%. Comparing base (75cd618) to head (fcb7ac8).

Additional details and impacted files

Impacted file tree graph

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

see 8 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@testlens-app

testlens-app Bot commented Aug 21, 2026

Copy link
Copy Markdown

✅ All tests passed ✅

🏷️ Commit: fcb7ac8
▶️ Tests: 63804 executed
⚪️ Checks: 77/77 completed


Learn more about TestLens at testlens.app/docs.

@borinquenkid borinquenkid moved this to In Progress in Apache Grails Aug 21, 2026
@borinquenkid borinquenkid added this to the grails:8.1.0-M1 milestone Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants