You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The units tests in our Grails 3.2.6 project with Spock have stopped working when launched from IntelliJ 2017.2.5 (right-click on the test folder, Run as unit tests). Exception with Stack size too large message appears, tests won't start.
Exception in thread "main" java.lang.VerifyError: (class: our/projects/SomeNiceSpec, method: $spock_feature_1_3 signature: ()V) Stack size too large
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at org.junit.internal.builders.SuiteMethodBuilder.hasSuiteMethod(SuiteMethodBuilder.java:18)
at com.intellij.junit4.JUnit46ClassesRequestBuilder.collectWrappedRunners(JUnit46ClassesRequestBuilder.java:75)
at com.intellij.junit4.JUnit46ClassesRequestBuilder.getClassesRequest(JUnit46ClassesRequestBuilder.java:47)
at com.intellij.junit4.JUnit4TestRunnerUtil.buildRequest(JUnit4TestRunnerUtil.java:89)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:46)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Process finished with exit code 1
Empty test suite.
How to reproduce
It was working fine until a benign change that has nothing to do with the failing our/projects/SomeNiceSpec was merged to the codebase.
The test involved is fairly simple, and uses the same boring testing pattern found widely in the rest of the app.
The tests still work fine when launched by Gradle (:server:cleanTest :server:test with --tests *) but fail when launched from the IJ (appear under JUnit in the Run/Debug Configuration dialog box).
I cannot reproduce the code here as it's my customer property, and anyways it would not allow you to reproduce the issue unless it'd make a large project available.
I do not have a simple reproducible sequence - sorry, again, it stopped working when unrelated code was added.
No influence:
IJ specific version; I've tested with 2017.2.6 and 2017.2.5
JDK specific version; I've tested with 8u121 and 8u152-zulu
Workaround
We noticed that by removing the first and: declaration in the following test, it worked again:
void "save train (...)"() {
given:
dataset.uniqueCompanyDataset.withTrainParkingSpendingPlan()
and: // remove this line and it works again
def info = new ConfigCompanySpendingPlanInfoListItem(
language: Language.fr,
text: 'train parking fr',
moreInfoUrl: 'http://unbox.work/fr/more',
termsAndConditionsUrl: 'http://unbox.work/fr/terms'
)
and:
mockLoggedInUser(service, dataset.uniqueEmployee)
when: "you save the info"
service.saveInfo(info)
then:
thrown(TenantAccessException)
}
I realize this is not much to work on but at least Google may lead you here and this workaround may apply to you.
Additional Environment information
IntelliJ IDEA 2017.2.5
Build #IU-172.4343.14, built on September 26, 2017
JRE: 1.8.0_152-release-915-b12 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.6
IJ launch command (super long classpath truncated):
Issue description
The units tests in our Grails 3.2.6 project with Spock have stopped working when launched from IntelliJ 2017.2.5 (right-click on the test folder, Run as unit tests). Exception with
Stack size too large
message appears, tests won't start.How to reproduce
our/projects/SomeNiceSpec
was merged to the codebase.:server:cleanTest :server:test
with--tests *
) but fail when launched from the IJ (appear under JUnit in the Run/Debug Configuration dialog box).No influence:
2017.2.6
and2017.2.5
8u121
and8u152-zulu
Workaround
We noticed that by removing the first
and:
declaration in the following test, it worked again:I realize this is not much to work on but at least Google may lead you here and this workaround may apply to you.
Additional Environment information
IJ launch command (super long classpath truncated):
See Also
#58
The text was updated successfully, but these errors were encountered: