You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@grails.apache.org by "borinquenkid (via GitHub)" <gi...@apache.org> on 2026/08/30 22:32:23 UTC

[PR] test: raise coverage in grails-data-hibernate7 [grails-core]

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

   ## Summary
   - Closes real JaCoCo coverage gaps in `grails-data-hibernate7` (both the `core` and `grails-plugin` subprojects) — no production code changes, tests only.
   - `AggregatePersistenceContextInterceptor`: 24.5% → 86.8% (no dedicated Spec existed for the multi-datasource lifecycle fan-out).
   - `HibernateCriteriaBuilder`: 72.7% → 89.6%, `PredicateGenerator`: 83.2% → 85.2% (extended the existing "low-level method coverage" Direct spec: createAlias, exists/notExists closures, eqAll/gtSome/geSome/ltSome/leSome, notIn, inList, ignoreCase eq, plus the documented `PredicateGenerator.registerCriterionHandler` extension point).
   - `DetachedAssociationFunction`: 50% → 100%, `IdentityEnumType`: 65.6% → 91.8% (`BidiEnumMap` → 100%).
   - `GrailsHibernateUtil`: 77.9% → 85.3% (proxy-unwrap branches reached by explicitly initializing a Hibernate proxy after clearing the session, plus the single-arg delegate overloads).
   - `ManyToOneBinder`: 78.2% → 100% (composite-identity join-key derivation for circular many-to-many associations).
   - `ChildHibernateDatastore`: 80% → 100%, `SelectHqlQuery`: 82.9% → 100%, `JpaQueryContext`: 78.5% → 95.4%.
   - `HibernateGrailsPlugin`: 0% → 100% — added a new `HibernateGrailsPluginSpec` that drives `doWithSpring()` through a `BeanBuilder`, following the existing `QuartzGrailsPluginSpec` pattern (no plugin manager or full app bootstrap needed).
   
   **Module totals:** `core` 93.6% → 94.9%, `grails-plugin` 63.7% → 77.8%.
   
   A couple of items were deliberately left alone and are not part of this PR:
   - `HibernateQueryConstants` and `ProjectionPredicate` are unreferenced/deprecated dead code — flagged as removal candidates rather than given tests to inflate coverage on code nothing calls.
   - A handful of defensive "unsupported X" exception branches and TRACE-level log lines in `GrailsHibernateUtil`/`PredicateGenerator` aren't reachable through the public Groovy-compiled API surface in this module.
   
   ## Test plan
   - [x] `./gradlew :grails-data-hibernate7-core:test` — full suite green (3101 tests)
   - [x] `./gradlew :grails-data-hibernate7:test` — full suite green (28 tests)
   - [x] `./gradlew :grails-data-hibernate7-core:codeStyle :grails-data-hibernate7:codeStyle` — clean
   - [x] JaCoCo reports regenerated after each change to confirm real coverage movement (not stale cached reports)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01QAjfckcY4EJsxranv1RyGV


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test: raise coverage in grails-data-hibernate7 [grails-core]

Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #16278:
URL: https://github.com/apache/grails-core/pull/16278#issuecomment-5471784783

   ## 🚨 TestLens detected 1 failed test 🚨
   
   Here is what you can do:
   
   1) Inspect the test failures carefully.
   2) If you are convinced that some of the tests are flaky, you can mute them below.
   3) Finally, trigger a rerun by checking the rerun checkbox.
   
   ### Test Summary
   
   #### [CI / Functional Tests \(Java 25, indy\=false, shard 1\)](https://github.com/apache/grails-core/actions/runs/33339417662/job/99332210701?pr=16278) > :grails-test-examples-gsp-sitemesh3:integrationTest
   
   | Test | Runs | Flakiness |
   |---|---|--:|
   | EndToEndSpec > async multiple levels of layouts | ❌ | [1%&nbsp;🟡](https://github.com/apache/grails-core/issues/16030) |
   
   🏷️ Commit: 7fce7d8d220af2909f63acb6685c33d479bc6b8b
   ▶️ Tests:  31162 executed
   🟡 Checks: 33/77 completed
   
   ### Test Failures
   
   <details>
   
   <summary><strong>EndToEndSpec > async multiple levels of layouts</strong> (:grails-test-examples-gsp-sitemesh3:integrationTest in <a href="https://github.com/apache/grails-core/actions/runs/33339417662/job/99332210701?pr=16278">CI / Functional Tests (Java 25, indy=false, shard 1)</a>)</summary>
   
   ```
   Condition not satisfied:
   
   pageSource == """<html><head><title>Decorated Base - Dialog - This is the title</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head> <body><h1>Hello</h1><div id="base"><div id="dialog">body text</div></div> </body></html>"""
   |          |
   |          false
   |          Strings too large to calculate edit distance.
   <html lang="en"><head><title>HTTP Status 500 – Internal Server Error</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 500 – Internal Server Error</h1></body></html>
   
   	at EndToEndSpec.async multiple levels of layouts(EndToEndSpec.groovy:107)
   ```
   
   |expected|actual|
   |---|---|
   |\<html\>\<head\>\<title\><s>Decorated</s> <s>Base</s> <s>-</s> <s>Dialog</s> <s>-</s> <s>This</s> <s>is the title</s>\</title\>\<<s>meta</s> <s>http</s>-<s>equiv\=\"Content</s>-<s>Type\"</s> <s>content\=\"text/html</s>; <s>charset\=UTF</s>-<s>8\"</s>\>\</head\>|\<html<b> lang\=\"en\"</b>\>\<head\>\<title\><b>HTTP</b> <b>Status</b> <b>500</b> <b>–</b> <b>Internal</b> <b>Server</b> <b>Error</b>\</title\>\<<b>style</b> <b>type\=\"text/css\"\>body \{font</b>-<b>family:Tahoma,Arial,sans</b>-<b>serif;\}</b> <b>h1, h2, h3, b \{color:white</b>;<b>background-color:<span>#</span>525D76;\}</b> <b>h1 \{font</b>-<b>size:22px;\} h2 \{font-size:16px;\} h3 \{font-size:14px;\} p \{font-size:12px;\} a \{color:black;\} .line \{height:1px;background-color:<span>#</span>525D76;border:none;\}\</style</b>\>\</head<b>\>\<body\>\<h1</b>\><b>HTTP Status 500 – Internal Server Error\</h1\>\</body\>\</html\></b>|
   |<s>\<body\>\<h1\>Hello\</h1\>\<div id\=\"base\"\>\<div id\=\"dialog\"\>body text\</div\>\</div\></s>||
   |<s>\</body\>\</html\></s>||
   
   </details>
   
   ### Rerun Controls
   > [!NOTE]
   > Checks are currently running using the configuration below.
   
   Select tests to mute in this pull request:
   
   🔲 EndToEndSpec > async multiple levels of layouts <!-- uniqueId=[engine:spock]/[spec:EndToEndSpec]/[feature:$spock_feature_1_7] -->
   
   Reuse successful test results:
   
   🔲 ♻️ Only rerun the tests that failed or were muted before
   
   Click the checkbox to trigger a rerun:
   
   🔲 **Rerun jobs**
   
   ---
   _Learn more about TestLens at [testlens.app/docs](https://testlens.app/docs/features/pr-comment/)._
   


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test: raise coverage in grails-data-hibernate7 [grails-core]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #16278:
URL: https://github.com/apache/grails-core/pull/16278#issuecomment-5471873129

   ## [Codecov](https://app.codecov.io/gh/apache/grails-core/pull/16278?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 29.8834%. Comparing base ([`bb21a3a`](https://app.codecov.io/gh/apache/grails-core/commit/bb21a3aef16c97f12cf427625d464d1218248f6a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`7fce7d8`](https://app.codecov.io/gh/apache/grails-core/commit/7fce7d8d220af2909f63acb6685c33d479bc6b8b?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   [![Impacted file tree graph](https://app.codecov.io/gh/apache/grails-core/pull/16278/graphs/tree.svg?width=650&height=150&src=pr&token=qJrryhpk7u&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/grails-core/pull/16278?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@              Coverage Diff              @@
   ##                8.1.x     #16278   +/-   ##
   =============================================
     Coverage     29.8834%   29.8834%           
     Complexity        509        509           
   =============================================
     Files              79         79           
     Lines            4715       4715           
     Branches          814        814           
   =============================================
     Hits             1409       1409           
     Misses           3063       3063           
     Partials          243        243           
   ```
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test: raise coverage in grails-data-hibernate7 [grails-core]

Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty merged PR #16278:
URL: https://github.com/apache/grails-core/pull/16278


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org