vips_java icon indicating copy to clipboard operation
vips_java copied to clipboard

Test failures when mvn package

Open Luux opened this issue 6 years ago • 1 comments

When I try to build the package via "mvn package", following error occurs:

`mvn package [INFO] Scanning for projects... [INFO] [INFO] -----------------------< org.fit.vips:vips-java >----------------------- [INFO] Building vips-java 1.0 [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ vips-java --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory C:\Users[...]\VIPS\vips_java\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ vips-java --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ vips-java --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory C:\Users[...]\VIPS\vips_java\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ vips-java --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-surefire-plugin:2.22.0:test (default-test) @ vips-java --- [INFO] [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running org.fit.vips.VipsTest Connection resetSomething's wrong! java.lang.NullPointerException at org.fit.vips.Vips.getViewport(Vips.java:157) at org.fit.vips.Vips.startSegmentation(Vips.java:361) at org.fit.vips.Vips.startSegmentation(Vips.java:318) at org.fit.vips.VipsTest.runSimplePageSegmentation(VipsTest.java:18) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:515) at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:115) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:171) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:167) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:114) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:59) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:131) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:127) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:107) at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:136) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:127) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:107) at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:136) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:127) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:107) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:52) at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:170) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:154) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:90) at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:142) at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:117) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:383) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:344) at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:417) [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.697 s <<< FAILURE! - in org.fit.vips.VipsTest [ERROR] runSimplePageSegmentation Time elapsed: 0.693 s <<< FAILURE! org.opentest4j.AssertionFailedError: expected: but was: at org.fit.vips.VipsTest.runSimplePageSegmentation(VipsTest.java:21)

[INFO] [INFO] Results: [INFO] [ERROR] Failures: [ERROR] VipsTest.runSimplePageSegmentation:21 expected: but was: [INFO] [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.752 s [INFO] Finished at: 2019-08-19T10:50:55+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.0:test (default-test) on project vips-java: There are test failures. [ERROR] [ERROR] Please refer to C:\Users[...]\VIPS\vips_java\target\surefire-reports for the individual test results. [ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream. [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException`

I tried ignoring the tests by "mvn -Dmaven.test.skip=true package". In this case, compilation seems to be successfull, but running VIPS via "java -cp target/vips-java-1.0-jar-with-dependencies.jar org.fit.vips.VipsTester https://www.buecher.de" results in following error: Connection resetSomething's wrong! java.lang.NullPointerException at org.fit.vips.Vips.getViewport(Vips.java:157) at org.fit.vips.Vips.startSegmentation(Vips.java:361) at org.fit.vips.Vips.startSegmentation(Vips.java:318) at org.fit.vips.VipsTester.main(VipsTester.java:41)

This could be a problem with CSSBox, is there anything I'm missing?

Luux avatar Aug 19 '19 09:08 Luux

Hi Luux,

I think that you are right and this could be a CSSBox problem. Can you open the issue against https://github.com/radkovo/CSSBox?

tpopela avatar Aug 20 '19 04:08 tpopela