alfredxiao / gedcomparser

GEDCOM parser, convert an GEDCOM raw data file into XML
Apache License 2.0
1 stars 0 forks source link

mvn test failure #1

Open themighty1 opened 5 years ago

themighty1 commented 5 years ago

when running mvn test, I get

Tests run: 7, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.533 sec <<< FAILURE! - in xiaoyf.demo.aconex.gedcom.GParserTest Run main method without any arguments(xiaoyf.demo.aconex.gedcom.GParserTest) Time elapsed: 0.15 sec <<< ERROR! java.lang.IllegalArgumentException: null at net.sf.cglib.proxy.BridgeMethodResolver.resolveAll(BridgeMethodResolver.java:61) at net.sf.cglib.proxy.Enhancer.emitMethods(Enhancer.java:911) at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:498) at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25) at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216) at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377) at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317) at org.spockframework.mock.runtime.ProxyBasedMockFactory$CglibMockFactory.createMock(ProxyBasedMockFactory.java:91) at org.spockframework.mock.runtime.ProxyBasedMockFactory.create(ProxyBasedMockFactory.java:49) at org.spockframework.mock.runtime.JavaMockFactory.create(JavaMockFactory.java:51) at org.spockframework.mock.runtime.CompositeMockFactory.create(CompositeMockFactory.java:44) at org.spockframework.lang.SpecInternals.createMock(SpecInternals.java:47) at org.spockframework.lang.SpecInternals.createMockImpl(SpecInternals.java:282) at org.spockframework.lang.SpecInternals.MockImpl(SpecInternals.java:99) at xiaoyf.demo.aconex.gedcom.GParserTest.Run main method without any arguments(GParserTest.groovy:172)

Running xiaoyf.demo.aconex.gedcom.GProcessorTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.343 sec - in xiaoyf.demo.aconex.gedcom.GProcessorTest

Results :

Tests in error: GParserTest.Run main method without any arguments:172->SpecInternals.MockImpl:99->SpecInternals.createMockImpl:282->SpecInternals.createMock:47 » IllegalArgument

Tests run: 10, Failures: 0, Errors: 1, Skipped: 0

alfredxiao commented 5 years ago

You above test result is what I get when running mvn test using JDK8, and it will work without an error in JDK7 - I have tested in 1.7.0_80. This is probably due to the code was created before JDK8 was released/popular and there is some sort of conflict between spock or groovy with JDK8. If you do need to run it in a JDK other than JDK7, I can try to fix this. Just let me know which JDK version you intend to run things.