This is an automated email from the ASF dual-hosted git repository.
jdaugherty pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/grails-core.git
The following commit(s) were added to refs/heads/8.0.x by this push:
new 08bd0bfbeb Use unique names so tests do not overlap
08bd0bfbeb is described below
commit 08bd0bfbeb3d466f1b63398dd29f09f5a59f3cdc
Author: James Daugherty <[email protected]>
AuthorDate: Sat Jul 11 15:44:39 2026 -0400
Use unique names so tests do not overlap
---
.../query/transform/WhereQueryClosureCaptureSpec.groovy | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git
a/grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/query/transform/WhereQueryClosureCaptureSpec.groovy
b/grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/query/transform/WhereQueryClosureCaptureSpec.groovy
index f57617b856..0870b3b240 100644
---
a/grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/query/transform/WhereQueryClosureCaptureSpec.groovy
+++
b/grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/query/transform/WhereQueryClosureCaptureSpec.groovy
@@ -31,26 +31,28 @@ import spock.lang.Specification
*/
class WhereQueryClosureCaptureSpec extends Specification {
+ // The domain class names must be unique across the test JVM because
+ // AstPropertyResolveUtils caches resolved properties statically by class
name
private static final String SERVICE_SOURCE = '''
import grails.gorm.DetachedCriteria
import grails.gorm.annotation.Entity
-class BookQueryService {
- protected DetachedCriteria<Book>
findQueryByBookIdAndAuthorName(Serializable bookId, String authorName) {
- Book.where {
+class ClosureCaptureBookQueryService {
+ protected DetachedCriteria<ClosureCaptureBook>
findQueryByBookIdAndAuthorName(Serializable bookId, String authorName) {
+ ClosureCaptureBook.where {
bookId == bookId && author.name == authorName
}
}
}
@Entity
-class Book {
+class ClosureCaptureBook {
Long bookId
- Author author
+ ClosureCaptureAuthor author
}
@Entity
-class Author {
+class ClosureCaptureAuthor {
String name
}
'''