hakandilek / spock

Automatically exported from code.google.com/p/spock
0 stars 0 forks source link

Test class initialization error with private static method. #388

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem? If possible, provide source code and
stack trace.
1. Compile the attached code on CI (company package names are omitted).
2. An initialization error appears (see attached stack trace).

What version of Spock and Groovy are you using?

I use groovy version 2.4.0 with spock-core and spock-spring version 0.7

Please provide any additional information below. You can also assign
labels.

The compilation error went away after I moved the content of the private static 
method into the setup() method, declared a corresponding class variable to hold 
the outcome and deleted the private static method.
Another noteable thing was that I got the error only when compiling code on CI, 
not locally, and I don't know how the CI was configured. Classes that are being 
mocked/autowired in the given code were written in Java 7, JDK 1.7.0_72.

Original issue reported on code.google.com by Jiallomb...@gmail.com on 16 Feb 2015 at 12:28

Attachments: