You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by jd...@apache.org on 2026/05/12 21:17:34 UTC
(grails-core) 03/04: Remove `@Requires`
This is an automated email from the ASF dual-hosted git repository.
jdaugherty pushed a commit to branch 8.0.x-hibernate7
in repository https://gitbox.apache.org/repos/asf/grails-core.git
commit 5de7060d3e62ef50b396e16b1353c03afeb25658
Author: James Daugherty <jd...@jdresources.net>
AuthorDate: Tue May 12 16:43:06 2026 -0400
Remove `@Requires`
---
.../data/testing/tck/tests/FindByMethodSpec.groovy | 51 ++++++++--------------
1 file changed, 17 insertions(+), 34 deletions(-)
diff --git a/grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/tests/FindByMethodSpec.groovy b/grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/tests/FindByMethodSpec.groovy
index 5626333659..a4a62b2afa 100644
--- a/grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/tests/FindByMethodSpec.groovy
+++ b/grails-datamapping-tck/src/main/groovy/org/apache/grails/data/testing/tck/tests/FindByMethodSpec.groovy
@@ -18,8 +18,6 @@
*/
package org.apache.grails.data.testing.tck.tests
-import spock.lang.Requires
-
import org.apache.grails.data.testing.tck.domains.Book as TckBook
import org.apache.grails.data.testing.tck.domains.Highway
import org.apache.grails.data.testing.tck.domains.Person
@@ -39,11 +37,6 @@ class FindByMethodSpec extends GrailsDataTckSpec {
manager.addAllDomainClasses([Person, TckBook, Highway])
}
- @Requires({
- System.getProperty('hibernate5.gorm.suite') == 'true' ||
- System.getProperty('hibernate7.gorm.suite') == 'true' ||
- System.getProperty('mongodb.gorm.suite') == 'true'
- })
void 'Test Using AND Multiple Times In A Dynamic Finder'() {
given:
new Person(firstName: 'Jake', lastName: 'Brown', age: 11).save()
@@ -83,11 +76,6 @@ class FindByMethodSpec extends GrailsDataTckSpec {
1 == cnt
}
- @Requires({
- System.getProperty('hibernate5.gorm.suite') == 'true' ||
- System.getProperty('hibernate7.gorm.suite') == 'true' ||
- System.getProperty('mongodb.gorm.suite') == 'true'
- })
void 'Test Using OR Multiple Times In A Dynamic Finder'() {
given:
new Person(firstName: 'Jake', lastName: 'Brown', age: 11).save()
@@ -114,11 +102,6 @@ class FindByMethodSpec extends GrailsDataTckSpec {
3 == cnt
}
- @Requires({
- System.getProperty('hibernate5.gorm.suite') == 'true' ||
- System.getProperty('hibernate7.gorm.suite') == 'true' ||
- System.getProperty('mongodb.gorm.suite') == 'true'
- })
void testBooleanPropertyQuery() {
given:
new Highway(bypassed: true, name: 'Bypassed Highway').save()
@@ -308,25 +291,25 @@ class FindByMethodSpec extends GrailsDataTckSpec {
thrown(exception)
where:
- index | methodName | exception | action
+ index | methodName | exception | action
// findOrCreateBy patterns
- 1 | 'findOrCreateByAuthorInList' | MissingMethodException | { TckBook.findOrCreateByAuthorInList(['Jeff']) }
- 2 | 'findOrCreateByAuthorOrTitle' | MissingMethodException | { TckBook.findOrCreateByAuthorOrTitle('Jim', 'Title') }
- 3 | 'findOrCreateByAuthorNotEqual' | MissingMethodException | { TckBook.findOrCreateByAuthorNotEqual('B') }
- 4 | 'findOrCreateByAuthorGreaterThan' | ConfigurationException | { TckBook.findOrCreateByAuthorGreaterThan('B') }
- 5 | 'findOrCreateByAuthorLessThan' | ConfigurationException | { TckBook.findOrCreateByAuthorLessThan('B') }
- 6 | 'findOrCreateByAuthorBetween' | MissingMethodException | { TckBook.findOrCreateByAuthorBetween('A', 'B') }
- 7 | 'findOrCreateByAuthorGreaterThanEquals' | ConfigurationException | { TckBook.findOrCreateByAuthorGreaterThanEquals('B') }
- 8 | 'findOrCreateByAuthorLessThanEquals' | ConfigurationException | { TckBook.findOrCreateByAuthorLessThanEquals('B') }
+ 1 | 'findOrCreateByAuthorInList' | MissingMethodException | { TckBook.findOrCreateByAuthorInList(['Jeff']) }
+ 2 | 'findOrCreateByAuthorOrTitle' | MissingMethodException | { TckBook.findOrCreateByAuthorOrTitle('Jim', 'Title') }
+ 3 | 'findOrCreateByAuthorNotEqual' | MissingMethodException | { TckBook.findOrCreateByAuthorNotEqual('B') }
+ 4 | 'findOrCreateByAuthorGreaterThan' | ConfigurationException | { TckBook.findOrCreateByAuthorGreaterThan('B') }
+ 5 | 'findOrCreateByAuthorLessThan' | ConfigurationException | { TckBook.findOrCreateByAuthorLessThan('B') }
+ 6 | 'findOrCreateByAuthorBetween' | MissingMethodException | { TckBook.findOrCreateByAuthorBetween('A', 'B') }
+ 7 | 'findOrCreateByAuthorGreaterThanEquals' | ConfigurationException | { TckBook.findOrCreateByAuthorGreaterThanEquals('B') }
+ 8 | 'findOrCreateByAuthorLessThanEquals' | ConfigurationException | { TckBook.findOrCreateByAuthorLessThanEquals('B') }
// findOrSaveBy patterns
- 9 | 'findOrSaveByAuthorInList' | MissingMethodException | { TckBook.findOrSaveByAuthorInList(['Jeff']) }
- 10 | 'findOrSaveByAuthorOrTitle' | MissingMethodException | { TckBook.findOrSaveByAuthorOrTitle('Jim', 'Title') }
- 11 | 'findOrSaveByAuthorNotEqual' | MissingMethodException | { TckBook.findOrSaveByAuthorNotEqual('B') }
- 12 | 'findOrSaveByAuthorGreaterThan' | ConfigurationException | { TckBook.findOrSaveByAuthorGreaterThan('B') }
- 13 | 'findOrSaveByAuthorLessThan' | ConfigurationException | { TckBook.findOrSaveByAuthorLessThan('B') }
- 14 | 'findOrSaveByAuthorBetween' | MissingMethodException | { TckBook.findOrSaveByAuthorBetween('A', 'B') }
- 15 | 'findOrSaveByAuthorGreaterThanEquals' | ConfigurationException | { TckBook.findOrSaveByAuthorGreaterThanEquals('B') }
- 16 | 'findOrSaveByAuthorLessThanEquals' | ConfigurationException | { TckBook.findOrSaveByAuthorLessThanEquals('B') }
+ 9 | 'findOrSaveByAuthorInList' | MissingMethodException | { TckBook.findOrSaveByAuthorInList(['Jeff']) }
+ 10 | 'findOrSaveByAuthorOrTitle' | MissingMethodException | { TckBook.findOrSaveByAuthorOrTitle('Jim', 'Title') }
+ 11 | 'findOrSaveByAuthorNotEqual' | MissingMethodException | { TckBook.findOrSaveByAuthorNotEqual('B') }
+ 12 | 'findOrSaveByAuthorGreaterThan' | ConfigurationException | { TckBook.findOrSaveByAuthorGreaterThan('B') }
+ 13 | 'findOrSaveByAuthorLessThan' | ConfigurationException | { TckBook.findOrSaveByAuthorLessThan('B') }
+ 14 | 'findOrSaveByAuthorBetween' | MissingMethodException | { TckBook.findOrSaveByAuthorBetween('A', 'B') }
+ 15 | 'findOrSaveByAuthorGreaterThanEquals' | ConfigurationException | { TckBook.findOrSaveByAuthorGreaterThanEquals('B') }
+ 16 | 'findOrSaveByAuthorLessThanEquals' | ConfigurationException | { TckBook.findOrSaveByAuthorLessThanEquals('B') }
}
}