matrei commented on code in PR #15335:
URL: https://github.com/apache/grails-core/pull/15335#discussion_r2728631972


##########
grails-test-suite-web/src/test/groovy/org/grails/web/commandobjects/CommandObjectNoDataSpec.groovy:
##########
@@ -20,16 +20,64 @@
 package org.grails.web.commandobjects
 
 import grails.testing.web.GrailsWebUnitTest
+import org.grails.validation.ConstraintEvalUtils
+import spock.lang.Isolated
 import spock.lang.Specification
 
+/**
+ * Tests for command object validation without DataTest trait.
+ * This spec is marked @Isolated because it modifies global shared constraints
+ * via doWithConfig() which affects ConstraintEvalUtils.defaultConstraintsMap 
- a static
+ * cache shared across all tests in the same JVM fork.
+ */
+@Isolated

Review Comment:
   My understanding of `@Isolated` is that it is only useful when running Spock 
with parallel execution 
(https://spockframework.org/spock/docs/2.4/all_in_one.html#parallel-execution). 
We are not running parallel execution, we are running multiple forks (separate 
JVM processes, each running one Spec at a time), so Spock will run tests 
sequentially, in each fork.



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

Reply via email to