jamesfredley commented on code in PR #15335:
URL: https://github.com/apache/grails-core/pull/15335#discussion_r2725864113
##########
grails-test-suite-web/src/test/groovy/org/grails/web/commandobjects/CommandObjectNoDataSpec.groovy:
##########
@@ -30,6 +31,21 @@ class CommandObjectNoDataSpec extends Specification
implements GrailsWebUnitTest
}
}}
+ /**
+ * Clear the static constraints cache for Artist class.
+ * This is necessary because the Validateable trait caches constraints in
a static field,
+ * and in parallel test execution, the constraints may be evaluated before
doWithConfig()
+ * has registered the shared constraint 'isProg'.
+ *
+ * Also clear ConstraintEvalUtils.defaultConstraintsMap which caches
shared constraints
+ * globally. In parallel test execution, another test's config may have
been cached,
+ * causing the 'isProg' shared constraint to not be found.
+ */
+ def setup() {
+ ConstraintEvalUtils.clearDefaultConstraints()
Review Comment:
Added
##########
grails-test-suite-uber/src/test/groovy/org/grails/web/servlet/DefaultGrailsApplicationAttributesTests.groovy:
##########
@@ -50,6 +50,11 @@ class DefaultGrailsApplicationAttributesTests {
request.setAttribute(GrailsApplicationAttributes.CONTROLLER,
controller)
}
+ @org.junit.jupiter.api.AfterEach
Review Comment:
fixed
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]