This is an automated email from the ASF dual-hosted git repository.
borinquenkid pushed a commit to branch 8.0.x-hibernate7
in repository https://gitbox.apache.org/repos/asf/grails-core.git
The following commit(s) were added to refs/heads/8.0.x-hibernate7 by this push:
new 05368b662d Fix two CI test failures: H5 SaveWithInvalidEntitySpec and
DirtyCheckingAfterListenerSpec
05368b662d is described below
commit 05368b662d0ca7eb54ae0a349af7e53948fad7e1
Author: Walter Duque de Estrada <[email protected]>
AuthorDate: Fri Jun 19 00:48:13 2026 -0500
Fix two CI test failures: H5 SaveWithInvalidEntitySpec and
DirtyCheckingAfterListenerSpec
SaveWithInvalidEntitySpec: Grails 8 changed the default nullable setting for
unconstrained properties to true (ConnectionSourceSettings.nullable =
true), so
B.field1 with no explicit constraint was treated as nullable by GORM
validation —
the INSERT reached the DB and failed at the DDL level instead of being
vetoed by
GORM. Add explicit nullable: false constraint to B.field1 so the pre-insert
validation catches the null, sets errors, and vetoes before the SQL is sent.
DirtyCheckingAfterListenerSpec: the entityAccess.setProperty() fix added in
an
earlier commit made the test pass in the simple (non-Hibernate) datastore
suite
as well. The @PendingFeatureIf condition that excluded that suite now
triggers a
PendingFeatureSuccessfulError. Remove the annotation and its import.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
---
.../grails/gorm/tests/validation/SaveWithInvalidEntitySpec.groovy | 4 ++++
.../data/testing/tck/tests/DirtyCheckingAfterListenerSpec.groovy | 2 --
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git
a/grails-data-hibernate5/core/src/test/groovy/grails/gorm/tests/validation/SaveWithInvalidEntitySpec.groovy
b/grails-data-hibernate5/core/src/test/groovy/grails/gorm/tests/validation/SaveWithInvalidEntitySpec.groovy
index 171cdb21e7..e27de17360 100644
---
a/grails-data-hibernate5/core/src/test/groovy/grails/gorm/tests/validation/SaveWithInvalidEntitySpec.groovy
+++
b/grails-data-hibernate5/core/src/test/groovy/grails/gorm/tests/validation/SaveWithInvalidEntitySpec.groovy
@@ -62,4 +62,8 @@ class A {
class B {
String field1
String field2
+
+ static constraints = {
+ field1 nullable: false
+ }
}
diff --git
a/grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/tests/DirtyCheckingAfterListenerSpec.groovy
b/grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/tests/DirtyCheckingAfterListenerSpec.groovy
index 5378873440..42f84f5fa3 100644
---
a/grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/tests/DirtyCheckingAfterListenerSpec.groovy
+++
b/grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/tests/DirtyCheckingAfterListenerSpec.groovy
@@ -18,7 +18,6 @@
*/
package org.apache.grails.data.testing.tck.tests
-import spock.lang.PendingFeatureIf
import spock.util.concurrent.PollingConditions
import org.springframework.context.ApplicationEvent
@@ -54,7 +53,6 @@ class DirtyCheckingAfterListenerSpec extends
GrailsDataTckSpec {
}
}
- @PendingFeatureIf({ !Boolean.getBoolean('hibernate5.gorm.suite') &&
!Boolean.getBoolean('hibernate7.gorm.suite') &&
!Boolean.getBoolean('mongodb.gorm.suite') })
void 'test state change from listener update the object'() {
when: