This is an automated email from the ASF dual-hosted git repository.

jamesfredley pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/grails-core.git

commit 3b1aac5004501acd7efde3a95b9e284d48c8ffac
Merge: ae0e16bd6e 5ecbbc489e
Author: James Fredley <[email protected]>
AuthorDate: Wed Jan 28 22:13:28 2026 -0500

    Merge branch '7.0.x' into 7.1.x
    
    Resolve merge conflicts in Validateable constraint cache clearing tests.
    Keep the 7.1.x approach which uses the cleaner public API
    (ClassName.clearConstraintsMapCache()) instead of the 7.0.x
    reflection-based workaround.

 .github/workflows/codeql.yml                       |  2 +-
 .github/workflows/codestyle.yml                    |  2 +-
 .github/workflows/gradle.yml                       | 52 +++++++++++++++++++---
 .github/workflows/groovy-joint-workflow.yml        |  2 +-
 .github/workflows/rat.yml                          |  2 +-
 .github/workflows/release-notes.yml                |  6 +--
 build-logic/docs-core/build.gradle                 |  8 +---
 build.gradle                                       |  2 +-
 dependencies.gradle                                |  4 +-
 gradle/test-config.gradle                          | 23 ++++++----
 .../grails/boot/DevelopmentModeWatchSpec.groovy    |  4 +-
 ...aceHolderConfigurerCorePluginRuntimeSpec.groovy |  2 +
 .../compiler/injection/GrailsASTUtilsTests.groovy  |  9 +++-
 .../injection/GrailsArtefactTransformerSpec.groovy |  6 +--
 .../config/NavigableMapSpringProfilesSpec.groovy   |  2 +
 .../config/YamlPropertySourceLoaderSpec.groovy     |  8 ++--
 .../org/grails/plugins/GrailsPluginTests.groovy    |  9 +++-
 .../MultiTenancyBidirectionalManyToManySpec.groovy |  2 +
 .../connections/SchemaMultiTenantSpec.groovy       |  3 ++
 .../hibernate/connections/SingleTenantSpec.groovy  |  3 ++
 grails-data-hibernate5/dbmigration/build.gradle    | 13 ------
 .../MongoDbGormAutoConfigurationSpec.groovy        |  2 +
 ...ngoDbGormAutoConfigureWithGeoSpacialSpec.groovy |  2 +
 .../connections/MongoConnectionSourcesSpec.groovy  |  7 +++
 .../gorm/mongo/connections/MultiTenancySpec.groovy |  5 ++-
 .../connections/SchemaBasedMultiTenancySpec.groovy |  5 ++-
 .../mongo/connections/SingleTenancySpec.groovy     |  5 ++-
 .../MongoStaticApiMultiTenancySpec.groovy          |  5 ++-
 .../Neo4jAutoConfigurationSpec.groovy              |  2 +
 .../tests/multitenancy/MultiTenancySpec.groovy     |  4 ++
 .../tests/multitenancy/SingleTenancySpec.groovy    |  2 +
 .../database/DatabasePerTenantSpec.groovy          |  3 +-
 .../MultiTenantServiceTransformSpec.groovy         |  2 +
 .../partitioned/PartitionMultiTenancySpec.groovy   |  3 +-
 .../multitenancy/schema/SchemaPerTenantSpec.groovy |  6 +--
 .../gorm/tests/CurrentTenantTransformSpec.groovy   |  6 +--
 .../grails/gorm/tests/TenantServiceSpec.groovy     |  7 ++-
 .../grails/persistence/DomainClassTraitSpec.groovy |  6 +++
 grails-forge/buildSrc/build.gradle                 |  1 -
 grails-forge/gradle/test-config.gradle             | 10 -----
 grails-gradle/gradle/test-config.gradle            |  7 ---
 grails-gsp/plugin/build.gradle                     |  2 -
 .../mapping/RestfulReverseUrlRenderingTests.groovy | 21 +++++++++
 .../web/taglib/AbstractGrailsTagTests.groovy       |  7 +++
 .../org/grails/web/taglib/FormTagLibTests.groovy   | 28 ++++++++++++
 .../web/interceptors/UrlMappingMatcherSpec.groovy  |  7 +--
 .../web/mime/HttpServletRequestExtension.groovy    | 14 +++++-
 .../web/mime/HttpServletResponseExtension.groovy   |  2 +-
 .../groovy/grails/web/mime/MimeUtilitySpec.groovy  | 11 +++++
 .../web/mime/MimeTypesConfigurationSpec.groovy     | 11 +++++
 .../grails/web/mime/AcceptHeaderParserSpec.groovy  |  5 +++
 .../mvc/RequestAndResponseMimeTypesApiSpec.groovy  |  7 +++
 .../rest/render/DefaultRendererRegistrySpec.groovy | 11 +++++
 .../web/rest/render/VndErrorRenderingSpec.groovy   |  8 ++++
 .../web/rest/render/hal/HalJsonRendererSpec.groovy | 10 +++++
 .../web/rest/render/html/HtmlRendererSpec.groovy   | 10 +++++
 .../web/rest/render/json/JsonRendererSpec.groovy   |  2 +
 .../profile/commands/CreateAppCommandSpec.groovy   |  4 +-
 .../groovy/gorm/BindingOutsideRequestSpec.groovy   |  5 +++
 .../groovy/example/DatabasePerTenantSpec.groovy    |  6 +--
 .../example/PartitionedMultiTenancySpec.groovy     |  6 +--
 .../schemapertenant/SchemaPerTenantSpec.groovy     |  5 +--
 .../groovy/examples/mongo/tenant/BookSpec.groovy   |  7 ++-
 grails-test-suite-uber/build.gradle                |  2 +-
 ...GrailsCompileStaticCompilationErrorsSpec.groovy |  9 ++++
 .../GrailsTypeCheckedCompilationErrorsSpec.groovy  |  9 ++++
 .../grails/persistence/EntityTransformTests.groovy |  9 ++++
 .../groovy/grails/spring/BeanBuilderTests.groovy   |  9 ++++
 .../test/mixin/ControllerUnitTestMixinTests.groovy | 26 +++++++++++
 .../grails/test/mixin/RestfulControllerSpec.groovy | 11 +++++
 .../rest/render/BaseDomainClassRendererSpec.groovy |  8 ++++
 .../web/codecs/HTMLJSCodecIntegrationSpec.groovy   |  5 +++
 .../DefaultGrailsApplicationAttributesTests.groovy |  6 +++
 .../web/servlet/FlashScopeWithErrorsTests.groovy   |  5 +++
 .../grails/web/util/StreamCharBufferSpec.groovy    |  5 +++
 .../org/grails/web/util/WebUtilsTests.groovy       |  5 +++
 grails-test-suite-web/build.gradle                 |  2 +-
 .../grails/rest/web/RespondMethodSpec.groovy       | 20 +++++++++
 .../org/grails/compiler/web/WithFormatSpec.groovy  | 11 +++++
 .../rest/render/xml/DefaultXmlRendererSpec.groovy  |  5 +++
 ...ngHelperDomainClassSpecialPropertiesSpec.groovy |  9 ++++
 .../web/binding/JSONBindingToNullSpec.groovy       | 16 +++++++
 .../JsonBindingWithExceptionHandlerSpec.groovy     | 24 ++++++++++
 .../commandobjects/CommandObjectNoDataSpec.groovy  |  6 +++
 .../CommandObjectNullabilitySpec.groovy            | 26 +++++++++++
 .../web/commandobjects/CommandObjectsSpec.groovy   |  6 +++
 .../web/controllers/ContentNegotiationSpec.groovy  | 16 +++++++
 .../metaclass/CollectionBindDataMethodSpec.groovy  | 11 +++++
 .../web/mime/ContentFormatControllerTests.groovy   | 10 +++++
 .../web/mime/WithFormatContentTypeSpec.groovy      | 16 +++++++
 .../grails/testing/web/UrlMappingsUnitTest.groovy  | 10 +++++
 .../CommandObjectConstraintGettersSpec.groovy      | 40 +++++++++++++++++
 .../DefaultASTValidateableHelperSpec.groovy        |  9 ++++
 .../validation/SerializableValidateableSpec.groovy | 24 ++++++++++
 .../grails/validation/ValidateableMockSpec.groovy  | 24 ++++++++++
 .../grails/plugin/json/view/api/JsonApiSpec.groovy | 21 +++++++++
 .../LinkGeneratorWithUrlMappingsSpec.groovy        | 13 ++++++
 .../web/mapping/RestfulUrlMappingSpec.groovy       |  6 +++
 .../mapping/UrlMappingsWithHttpMethodSpec.groovy   |  6 +++
 .../web/mapping/mvc/EncodePathFromURISpec.groovy   |  5 +++
 100 files changed, 766 insertions(+), 122 deletions(-)

diff --cc 
grails-test-suite-web/src/test/groovy/org/grails/web/commandobjects/CommandObjectNoDataSpec.groovy
index 66b54fcb07,77aca024e5..df9c09a282
--- 
a/grails-test-suite-web/src/test/groovy/org/grails/web/commandobjects/CommandObjectNoDataSpec.groovy
+++ 
b/grails-test-suite-web/src/test/groovy/org/grails/web/commandobjects/CommandObjectNoDataSpec.groovy
@@@ -23,8 -23,17 +23,14 @@@ import grails.testing.web.GrailsWebUnit
  import org.grails.validation.ConstraintEvalUtils
  import spock.lang.Specification
  
+ /**
+  * Tests for command object validation without DataTest trait.
+  * This spec modifies global shared constraints via doWithConfig() which 
affects
+  * ConstraintEvalUtils.defaultConstraintsMap - a static cache shared across 
all tests
+  * in the same JVM fork. The setup/cleanup methods clear this cache to 
prevent test environment pollution.
+  */
  class CommandObjectNoDataSpec extends Specification implements 
GrailsWebUnitTest {
  
 -    // Cache the static field helper interface for performance
 -    private static final Class<?> STATIC_FIELD_HELPER = 
Class.forName('grails.validation.Validateable$Trait$StaticFieldHelper')
 -
      Closure doWithConfig() {{ config ->
          config['grails.gorm.default.constraints'] = {
              isProg inList: ['Emerson', 'Lake', 'Palmer']
diff --cc 
grails-test-suite-web/src/test/groovy/org/grails/web/commandobjects/CommandObjectsSpec.groovy
index 923b8944ea,d0f2906504..7194410726
--- 
a/grails-test-suite-web/src/test/groovy/org/grails/web/commandobjects/CommandObjectsSpec.groovy
+++ 
b/grails-test-suite-web/src/test/groovy/org/grails/web/commandobjects/CommandObjectsSpec.groovy
@@@ -27,8 -27,17 +27,14 @@@ import org.grails.validation.Constraint
  import spock.lang.Issue
  import spock.lang.Specification
  
+ /**
+  * Tests for command object binding and validation.
+  * This spec modifies global shared constraints via doWithConfig() which 
affects
+  * ConstraintEvalUtils.defaultConstraintsMap - a static cache shared across 
all tests
+  * in the same JVM fork. The setup/cleanup methods clear this cache to 
prevent test environment pollution.
+  */
  class CommandObjectsSpec extends Specification implements 
ControllerUnitTest<TestController>, DataTest {
  
 -    // Cache the static field helper interface for performance
 -    private static final Class<?> STATIC_FIELD_HELPER = 
Class.forName('grails.validation.Validateable$Trait$StaticFieldHelper')
 -
      Closure doWithSpring() {{ ->
          theAnswer(Integer, 42)
      }}

Reply via email to