Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
6b8c1ad
build: Groovy 5.0.0-SNAPSHOT and Spock 2.4-M6-groovy-4.0
matrei May 15, 2025
88baa17
build: add `-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true`
matrei May 15, 2025
f3edd09
fix: Groovy 5 compatibility
matrei May 15, 2025
d6b30be
test: Add `@PendingFeatureIf` for currently incompatible tests
matrei May 15, 2025
06ca132
Merge branch '7.0.x' into groovy-5
matrei Aug 17, 2025
9585aa0
fix: replace deprecated `capitalize` method
matrei Aug 17, 2025
8590837
Merge branch '7.0.x' into groovy-5
matrei Aug 23, 2025
082a4db
fix: Groovy 5 compatibility
matrei Aug 25, 2025
9859f19
fix(deps): `groovy` v. `5.0.0-SNAPSHOT` -> `5.0.1-SNAPSHOT`
matrei Sep 8, 2025
d84873f
Merge branch '7.0.x' into fork/matrei/groovy-5
matrei Sep 8, 2025
2a29983
test: add `@PendingFeatureIf` for failing tests
matrei Sep 8, 2025
91f13a9
test: remove `@PendingFeatureIf` for passing tests
matrei Sep 8, 2025
af119a9
fix: set required `value` on `@Generated`
matrei Sep 8, 2025
d00bfd5
chore: formatting
matrei Sep 8, 2025
9538ca0
test: add `@PendingFeatureIf` for failing tests
matrei Sep 8, 2025
4c7d0b4
fix: switch to groovy.transform.Generated
jdaugherty Sep 8, 2025
c9c0137
fix: remove value from Groovy `@Generated`
matrei Sep 9, 2025
574b576
fix: switch order of checks in condition
matrei Sep 9, 2025
81f1407
build: add Groovy version flag for Spock in forge
matrei Sep 9, 2025
1e00359
fix(deps): `groovy` v. `5.0.1-SNAPSHOT` -> `5.0.2-SNAPSHOT`
matrei Sep 11, 2025
1858aac
Merge branch '7.0.x' into groovy-5
matrei Sep 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ ext {
'bootstrap.version' : '5.3.7',
'commons-codec.version' : '1.18.0',
'geb-spock.version' : '7.0',
'groovy.version' : '4.0.28',
'groovy.version' : '5.0.2-SNAPSHOT',
'h2.version' : '2.3.232',
'jackson.version' : '2.19.1',
'jquery.version' : '3.7.1',
Expand All @@ -87,7 +87,7 @@ ext {
'rxjava2.version' : '2.2.21',
'rxjava3.version' : '3.1.11',
'selenium.version' : '4.34.0',
'spock.version' : '2.3-groovy-4.0',
'spock.version' : '2.4-M6-groovy-4.0',
'sitemesh.version' : '2.6.0',
'starter-sitemesh.version' : '3.2.2',
]
Expand Down
10 changes: 10 additions & 0 deletions gradle/functional-test-config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,21 @@ configurations.configureEach {
}
}

tasks.named('compileTestGroovy') {
options.forkOptions.jvmArgs += ['-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true']
}

tasks.named('compileGroovy') {
options.forkOptions.jvmArgs += ['-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true']
}
List<String> debugArguments = [
'-Xmx2g', '-Xdebug', '-Xnoagent', '-Djava.compiler=NONE',
'-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005'
]
tasks.withType(Test).configureEach { Test task ->

systemProperty('spock.iKnowWhatImDoing.disableGroovyVersionCheck', 'true')

boolean isHibernate5 = !project.name.startsWith('grails-test-examples-hibernate5')
boolean isMongo = !project.name.startsWith('grails-test-examples-mongodb')

Expand Down
9 changes: 9 additions & 0 deletions gradle/test-config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,16 @@ dependencies {
add('testRuntimeOnly', 'org.junit.platform:junit-platform-launcher')
}

tasks.named('compileTestGroovy') {
options.forkOptions.jvmArgs += ['-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true']
}

tasks.named('compileGroovy') {
options.forkOptions.jvmArgs += ['-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true']
}

tasks.withType(Test).configureEach {
systemProperty('spock.iKnowWhatImDoing.disableGroovyVersionCheck', 'true')
onlyIf {
![
'onlyFunctionalTests',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@
*/
package grails.async

import grails.async.decorator.PromiseDecorator
import org.grails.async.factory.future.CachedThreadPoolPromiseFactory
import java.util.concurrent.ExecutionException

import spock.lang.Issue
import spock.lang.PendingFeatureIf
import spock.lang.Specification
import spock.util.concurrent.PollingConditions

import java.util.concurrent.ExecutionException
import grails.async.decorator.PromiseDecorator
import org.grails.async.factory.future.CachedThreadPoolPromiseFactory

/**
* Created by graemerocher on 29/03/2017.
Expand Down Expand Up @@ -99,6 +101,10 @@ class FutureTaskPromiseFactorySpec extends Specification {
hasError == false
}

@PendingFeatureIf({
// thrown() does currently not work with Groovy 5
GroovySystem.version.startsWith('5')
})
void 'Test promise onError handling'() {

when: 'a promise is executed with an onComplete handler'
Expand All @@ -122,6 +128,10 @@ class FutureTaskPromiseFactorySpec extends Specification {
}
}

@PendingFeatureIf(
reason = "org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '4' with class 'java.lang.Integer' to class 'java.lang.Throwable'",
value = { GroovySystem.version.startsWith('5') }
)
void 'Test promise chaining'() {

when: 'a promise is chained'
Expand All @@ -133,6 +143,10 @@ class FutureTaskPromiseFactorySpec extends Specification {
val == 10
}

@PendingFeatureIf({
// thrown() does currently not work with Groovy 5
GroovySystem.version.startsWith('5')
})
void 'Test promise chaining with exception'() {

when: 'a promise is chained'
Expand All @@ -146,6 +160,10 @@ class FutureTaskPromiseFactorySpec extends Specification {
}

@Issue('GRAILS-10152')
@PendingFeatureIf({
// Mock() does currently not work with Groovy 5
GroovySystem.version.startsWith('5')
})
void 'Test promise closure is not executed multiple times if it returns null'() {

given: 'a closure that returns null'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
package grails.async

import spock.lang.PendingFeatureIf
import spock.lang.Specification
import spock.util.concurrent.PollingConditions

Expand Down Expand Up @@ -73,6 +74,10 @@ class PromiseListSpec extends Specification {

}

@PendingFeatureIf({
// thrown() does currently not work with Groovy 5
GroovySystem.version.startsWith('5')
})
void 'Test promise list with an exception'() {

when: 'a promise list with a promise that throws an exception is used'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package grails.async

import grails.async.decorator.PromiseDecorator
import spock.lang.PendingFeatureIf
import spock.lang.Specification
import spock.util.concurrent.PollingConditions

Expand All @@ -42,7 +43,11 @@ class PromiseSpec extends Specification {
result == '*10*'

}


@PendingFeatureIf({
// thrown() does currently not work with Groovy 5
GroovySystem.version.startsWith('5')
})
void 'Test promise timeout handling'() {

when: 'a promise that takes a while is created'
Expand Down Expand Up @@ -145,6 +150,10 @@ class PromiseSpec extends Specification {
}
}

@PendingFeatureIf({
// Cannot cast object '4' with class 'java.lang.Integer' to class 'java.lang.Throwable'
GroovySystem.version.startsWith('5')
})
void 'Test promise chaining'() {

when: 'a promise is chained'
Expand All @@ -156,6 +165,10 @@ class PromiseSpec extends Specification {
result == 10
}

@PendingFeatureIf({
// thrown() does currently not work with Groovy 5
GroovySystem.version.startsWith('5')
})
void 'Test promise chaining with exception'() {

when: 'a promise is chained'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ package grails.async
import grails.async.decorator.PromiseDecorator
import org.grails.async.factory.SynchronousPromiseFactory
import spock.lang.Issue
import spock.lang.PendingFeatureIf
import spock.lang.Specification
import spock.util.concurrent.PollingConditions

Expand Down Expand Up @@ -127,6 +128,10 @@ class SynchronousPromiseFactorySpec extends Specification {
result == 10
}

@PendingFeatureIf({
// thrown() does currently not work with Groovy 5
GroovySystem.version.startsWith('5')
})
void 'Test promise chaining with exception'() {

when: 'a promise is chained'
Expand All @@ -140,6 +145,10 @@ class SynchronousPromiseFactorySpec extends Specification {
}

@Issue('GRAILS-9229')
@PendingFeatureIf({
// Mock() does currently not work with Groovy 5
GroovySystem.version.startsWith('5')
})
void 'Test promise is executed without calling get'() {

given: 'a closure'
Expand All @@ -153,6 +162,10 @@ class SynchronousPromiseFactorySpec extends Specification {
}

@Issue('GRAILS-10152')
@PendingFeatureIf({
// Mock() does currently not work with Groovy 5
GroovySystem.version.startsWith('5')
})
void 'Test promise closure is not executed multiple times if it returns null'() {

given: 'a closure that returns null'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package grails.async

import grails.async.decorator.PromiseDecorator
import org.grails.async.factory.gpars.GparsPromiseFactory
import spock.lang.PendingFeatureIf
import spock.lang.Specification
import spock.util.concurrent.PollingConditions

Expand Down Expand Up @@ -47,7 +48,11 @@ class GparsPromiseSpec extends Specification {
then: 'the result is decorated'
result == '*10*'
}


@PendingFeatureIf({
// thrown() does currently not work with Groovy 5
GroovySystem.version.startsWith('5')
})
void 'Test promise timeout handling'() {

when: 'a promise that takes longer than the timeout'
Expand Down Expand Up @@ -142,6 +147,10 @@ class GparsPromiseSpec extends Specification {
value == 10
}

@PendingFeatureIf({
// thrown() does currently not work with Groovy 5
GroovySystem.version.startsWith('5')
})
void 'Test promise chaining with exception'() {

when: 'a promise with an exception is chained'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,18 @@ import grails.async.Promises
import grails.async.web.WebPromises
import grails.util.GrailsWebMockUtil
import org.springframework.web.context.request.RequestContextHolder
import spock.lang.PendingFeatureIf
import spock.lang.Specification

/**
* Created by graemerocher on 20/02/2017.
*/
class WebPromisesSpec extends Specification {

@PendingFeatureIf({
// thrown() does currently not work with Groovy 5
GroovySystem.version.startsWith('5')
})
void 'Test web promises handling'() {

setup:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package org.grails.async.factory.rxjava

import grails.async.PromiseList
import spock.lang.PendingFeatureIf
import spock.lang.Specification
import spock.util.concurrent.PollingConditions

Expand Down Expand Up @@ -77,6 +78,10 @@ class RxJavaPromiseListSpec extends Specification{
result == [1,2,3]
}

@PendingFeatureIf({
// thrown() does currently not work with Groovy 5
GroovySystem.version.startsWith('5')
})
void 'Test promise list with an exception'() {

given: 'a promise list with a promise that throws an exception'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package org.grails.async.factory.rxjava

import grails.async.Promises
import grails.async.decorator.PromiseDecorator
import spock.lang.PendingFeatureIf
import spock.lang.Specification
import spock.util.concurrent.PollingConditions

Expand Down Expand Up @@ -47,6 +48,11 @@ class RxJavaPromiseSpec extends Specification {
result == '*10*'

}

@PendingFeatureIf({
// thrown() does currently not work with Groovy 5
GroovySystem.version.startsWith('5')
})
void 'Test promise timeout handling'() {

when: 'a promise that takes a while is created'
Expand Down Expand Up @@ -140,6 +146,10 @@ class RxJavaPromiseSpec extends Specification {
val == 10
}

@PendingFeatureIf({
// thrown() does currently not work with Groovy 5
GroovySystem.version.startsWith('5')
})
void 'Test promise chaining with exception'() {

when: 'a promise is chained'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package org.grails.async.factory.rxjava2

import grails.async.PromiseList
import spock.lang.PendingFeatureIf
import spock.lang.Specification
import spock.util.concurrent.PollingConditions

Expand Down Expand Up @@ -77,6 +78,10 @@ class RxPromiseListSpec extends Specification {

}

@PendingFeatureIf({
// thrown() does currently not work with Groovy 5
GroovySystem.version.startsWith('5')
})
void 'Test promise list with an exception'() {

given: 'a promise list with a promise that throws an exception'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package org.grails.async.factory.rxjava2

import grails.async.Promises
import grails.async.decorator.PromiseDecorator
import spock.lang.PendingFeatureIf
import spock.lang.Specification
import spock.util.concurrent.PollingConditions

Expand Down Expand Up @@ -48,6 +49,10 @@ class RxPromiseSpec extends Specification {

}

@PendingFeatureIf({
// thrown() does currently not work with Groovy 5
GroovySystem.version.startsWith('5')
})
void 'Test promise timeout handling'() {

when: 'a promise that takes a while is created'
Expand Down Expand Up @@ -154,6 +159,10 @@ class RxPromiseSpec extends Specification {
value == 10
}

@PendingFeatureIf({
// thrown() does currently not work with Groovy 5
GroovySystem.version.startsWith('5')
})
void 'Test promise chaining with exception'() {

when: 'a promise is chained'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package org.grails.async.factory.rxjava3

import grails.async.PromiseList
import spock.lang.PendingFeatureIf
import spock.lang.Specification
import spock.util.concurrent.PollingConditions

Expand Down Expand Up @@ -74,6 +75,10 @@ class RxPromiseListSpec extends Specification {

}

@PendingFeatureIf({
// thrown() does currently not work with Groovy 5
GroovySystem.version.startsWith('5')
})
void 'Test promise list with an exception'() {

given: 'a promise list with a promise that throws an exception'
Expand Down
Loading
Loading