rkalla / imgscalr

Simple Java image-scaling library implementing Chris Campbell's incremental scaling algorithm as well as Java2D's "best-practices" image-scaling techniques.
Apache License 2.0
1.23k stars 243 forks source link

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project imgscalr-lib: There are test failures. #135

Open pedrombmachado opened 3 years ago

pedrombmachado commented 3 years ago

Dear imgscalr team, I am getting the error bellow when running mvn package using Apache Maven 3.8.2.

Thread Finished 19200
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 65.258 sec - in org.imgscalr.AsyncScalrMultiThreadTest
Running org.imgscalr.ScalrPadTest
Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.521 sec <<< FAILURE! - in org.imgscalr.ScalrPadTest
testPadAlphaOps(org.imgscalr.ScalrPadTest)  Time elapsed: 0.26 sec  <<< FAILURE!
java.lang.AssertionError: expected:<-11711155> but was:<-11776948>
    at org.imgscalr.ScalrPadTest.testPadAlphaOps(ScalrPadTest.java:64)

Running org.imgscalr.ScalrApplyTest
Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.364 sec <<< FAILURE! - in org.imgscalr.ScalrApplyTest
testApply4(org.imgscalr.ScalrApplyTest)  Time elapsed: 0.234 sec  <<< FAILURE!
java.lang.AssertionError: expected:<-11842741> but was:<-11908534>
    at org.imgscalr.ScalrApplyTest.testApply4(ScalrApplyTest.java:47)

Running org.imgscalr.ScalrResizeTest
Tests run: 13, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.838 sec <<< FAILURE! - in org.imgscalr.ScalrResizeTest
testResizeWHSpeedExactOps(org.imgscalr.ScalrResizeTest)  Time elapsed: 0.187 sec  <<< FAILURE!
java.lang.AssertionError: expected:<-11711155> but was:<-11776948>
    at org.imgscalr.ScalrResizeTest.testResizeWHSpeedExactOps(ScalrResizeTest.java:136)

Running org.imgscalr.ScalrRotateTest
Tests run: 7, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.744 sec <<< FAILURE! - in org.imgscalr.ScalrRotateTest
testRotateFlipHOps(org.imgscalr.ScalrRotateTest)  Time elapsed: 0.251 sec  <<< FAILURE!
java.lang.AssertionError: expected:<-15461356> but was:<-15527149>
    at org.imgscalr.ScalrRotateTest.testRotateFlipHOps(ScalrRotateTest.java:65)

Results :

Failed tests: 
  ScalrApplyTest.testApply4:47->AbstractScalrTest.assertEquals:77 expected:<-11842741> but was:<-11908534>
  ScalrCropTest.testCropXYWHOps:61->AbstractScalrTest.assertEquals:77 expected:<-14079703> but was:<-14145496>
  ScalrPadTest.testPadAlphaOps:64->AbstractScalrTest.assertEquals:77 expected:<-11711155> but was:<-11776948>
  ScalrResizeTest.testResizeWHSpeedExactOps:136->AbstractScalrTest.assertEquals:77 expected:<-11711155> but was:<-11776948>
  ScalrRotateTest.testRotateFlipHOps:65->AbstractScalrTest.assertEquals:77 expected:<-15461356> but was:<-15527149>

Tests run: 34, Failures: 5, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  05:28 min
[INFO] Finished at: 2021-09-02T21:48:32+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project imgscalr-lib: There are test failures.
[ERROR] 
[ERROR] Please refer to /home/pedro/repositories/imgscalr/target/surefire-reports for the individual test results.
[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
eix128 commented 3 years ago

Try it on "Java 8"

pedrombmachado commented 3 years ago

Hi @eix128 , The error was generated using Java 8

onacit commented 5 months ago
$ JAVA_HOME=$JAVA_HOME8 mvn --version                                             
Apache Maven 3.9.7 (8b094c9513efc1b9ce2d952b3b9c8eaedaf8cbf0)
Maven home: /opt/homebrew/Cellar/maven/3.9.7/libexec
Java version: 1.8.0_412, vendor: Temurin, runtime: /Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home/jre
Default locale: en_GH, platform encoding: UTF-8
OS name: "mac os x", version: "14.5", arch: "x86_64", family: "mac"
$ JAVA_HOME=$JAVA_HOME8 mvn -Dtest=\!Async\*ThreadTest clean test
org.imgscalr.ScalrApplyTest.testApply4 -- Time elapsed: 0.161 s <<< FAILURE!
java.lang.AssertionError: expected:<-11842741> but was:<-11908534>

org.imgscalr.ScalrApplyTest.testApply4 -- Time elapsed: 0.226 s <<< FAILURE!
java.lang.AssertionError: expected:<-11842741> but was:<-11908534>

org.imgscalr.ScalrCropTest.testCropXYWHOps -- Time elapsed: 0.051 s <<< FAILURE!
java.lang.AssertionError: expected:<-14079703> but was:<-14145496>

org.imgscalr.ScalrPadTest.testPadAlphaOps -- Time elapsed: 0.176 s <<< FAILURE!
java.lang.AssertionError: expected:<-11711155> but was:<-11776948>

org.imgscalr.ScalrResizeTest.testResizeWHSpeedExactOps -- Time elapsed: 0.123 s <<< FAILURE!
java.lang.AssertionError: expected:<-11711155> but was:<-11776948>

org.imgscalr.ScalrRotateTest.testRotateFlipHOps -- Time elapsed: 0.173 s <<< FAILURE!
java.lang.AssertionError: expected:<-15461356> but was:<-15527149>

Is this normal?