File tree 2 files changed +11
-7
lines changed
src/main/groovy/com/anotherchrisberry/spock/extensions/retry
2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,9 @@ repositories() {
6
6
}
7
7
8
8
dependencies {
9
- compile " org.codehaus.groovy:groovy:2.1 .3"
10
- compile " org.spockframework:spock-core:0.7 -groovy-2.0 "
9
+ compile " org.codehaus.groovy:groovy:2.4 .3"
10
+ compile " org.spockframework:spock-core:1.0 -groovy-2.4 "
11
11
}
12
12
13
- version = " 0.1 -SNAPSHOT"
13
+ version = " 0.2 -SNAPSHOT"
14
14
group = " com.anotherchrisberry"
Original file line number Diff line number Diff line change @@ -23,11 +23,15 @@ class RetryInterceptor implements IMethodInterceptor {
23
23
if (attempts > retryMax) {
24
24
throw t
25
25
}
26
- if (invocation. spec. cleanupMethod. reflection) {
27
- ReflectionUtil . invokeMethod(invocation. target, invocation. spec. cleanupMethod. reflection)
26
+ invocation. spec. cleanupMethods. each {
27
+ if (it. reflection) {
28
+ ReflectionUtil . invokeMethod(invocation. target, it. reflection)
29
+ }
28
30
}
29
- if (invocation. spec. setupMethod. reflection) {
30
- ReflectionUtil . invokeMethod(invocation. target, invocation. spec. setupMethod. reflection)
31
+ invocation. spec. setupMethods. each {
32
+ if (it. reflection) {
33
+ ReflectionUtil . invokeMethod(invocation. target, it. reflection)
34
+ }
31
35
}
32
36
}
33
37
}
You can’t perform that action at this time.
0 commit comments