winder / Universal-G-Code-Sender

A cross-platform G-Code sender for GRBL, Smoothieware, TinyG and G2core.
http://winder.github.io/ugs_website/
GNU General Public License v3.0
1.89k stars 764 forks source link

Build from master has test failures #2205

Closed nickmayer closed 1 year ago

nickmayer commented 1 year ago

Version

2.0.14

Hardware / Firmware

GRBL 1.1

What happened

When building from HEAD commit 62f1294f75844b2239155e0af0fa5b7294fc4f9a (HEAD, tag: v2.0.17, upstream/master) with a clean git repo on Windows 11 using openjdk version "13.0.1" 2019-10-15 the command mvn install fails.

Error:

[ERROR] com.willwinder.universalgcodesender.GrblControllerTest.beginStreamingShouldQueueTheCommandsInTheStream  Time elapsed: 0.09 s  <<< ERROR!
java.io.IOException: Cannot delete file: C:\Users\nickm\AppData\Local\Temp\temp10755719479846003093562086912700790\gcodeFile
        at com.willwinder.universalgcodesender.GrblControllerTest.beginStreamingShouldQueueTheCommandsInTheStream(GrblControllerTest.java:1316)
Caused by: java.nio.file.FileSystemException:
C:\Users\nickm\AppData\Local\Temp\temp10755719479846003093562086912700790\gcodeFile: The process cannot access the file because it is being used by another process.

        at com.willwinder.universalgcodesender.GrblControllerTest.beginStreamingShouldQueueTheCommandsInTheStream(GrblControllerTest.java:1316)
$ mvn --version
Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Maven home: D:\Tools\apache-maven-3.8.6
Java version: 13.0.1, vendor: AdoptOpenJDK, runtime: D:\Tools\jdk-13.0.1.9-hotspot
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

$ java -version
openjdk version "13.0.1" 2019-10-15
OpenJDK Runtime Environment AdoptOpenJDK (build 13.0.1+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 13.0.1+9, mixed mode, sharing)

How to reproduce

git checkout v2.0.17 git clean -xdf mvn install

Operating System

Win11

Anything else

No response

nickmayer commented 1 year ago

After that issue is fixed, other errors related to illegal reflective access happen

[INFO] Running com.willwinder.ugs.nbp.core.actions.OutlineActionTest
[ERROR] WARNING: An illegal reflective access operation has occurred
[ERROR] WARNING: Illegal reflective access by org.netbeans.ProxyURLStreamHandlerFactory (file:/C:/Users/nickm/.m2/repository/org/netbeans/modules/org-netbeans-bootstrap/RELEASE150/org-netbeans-bootstrap-RELEASE150.jar) to field java.net.URL.handler
[ERROR] WARNING: Please consider reporting this to the maintainers of org.netbeans.ProxyURLStreamHandlerFactory
[ERROR] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
[ERROR] WARNING: All illegal access operations will be denied in a future release

and

[INFO] Running com.willwinder.ugs.nbm.visualizer.actions.JogToHereActionTest
[ERROR] WARNING: An illegal reflective access operation has occurred
[ERROR] WARNING: Illegal reflective access by org.mockito.internal.util.reflection.AccessibilityChanger (file:/C:/Users/nickm/.m2/repository/org/mockito/mockito-core/3.2.4/mockito-core-3.2.4.jar) to field javax.swing.AbstractAction.enabled
[ERROR] WARNING: Please consider reporting this to the maintainers of org.mockito.internal.util.reflection.AccessibilityChanger
[ERROR] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
[ERROR] WARNING: All illegal access operations will be denied in a future release

and

[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.652 s - in com.willwinder.ugs.nbp.joystick.action.ActionDispatcherTest
[INFO] Running com.willwinder.ugs.nbp.joystick.action.ActionManagerTest
[ERROR] WARNING: An illegal reflective access operation has occurred
[ERROR] WARNING: Illegal reflective access by org.netbeans.ProxyURLStreamHandlerFactory (file:/C:/Users/nickm/.m2/repository/org/netbeans/modules/org-netbeans-bootstrap/RELEASE150/org-netbeans-bootstrap-RELEASE150.jar) to field java.net.URL.handler
[ERROR] WARNING: Please consider reporting this to the maintainers of org.netbeans.ProxyURLStreamHandlerFactory
[ERROR] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
[ERROR] WARNING: All illegal access operations will be denied in a future release
nickmayer commented 1 year ago

Was able to fix those by switching from openjdk to AdoptOpenJdk release found at https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/tag/jdk-13.0.1%2B9

New failure is in ugs-platform-plugin-cloud-storage

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project ugs-platform-plugin-cloud-storage: There are test failures.
[ERROR]
[ERROR] Please refer to D:\source\Universal-G-Code-Sender\ugs-platform\ugs-platform-plugin-cloud-storage\target\surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].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
[ERROR]
-------------------------------------------------------------------------------
Test set: com.willwinder.ugs.nbp.S3FileSystemViewTest
-------------------------------------------------------------------------------
Tests run: 4, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 2.792 s <<< FAILURE! - in com.willwinder.ugs.nbp.S3FileSystemViewTest
com.willwinder.ugs.nbp.S3FileSystemViewTest.testGetFiles  Time elapsed: 0.739 s  <<< FAILURE!
java.lang.AssertionError: 

Expected size: 2 but was: 1 in:
[D:\source\Universal-G-Code-Sender\ugs-platform\ugs-platform-plugin-cloud-storage\s3:\test-files]
    at com.willwinder.ugs.nbp.S3FileSystemViewTest.testGetFiles(S3FileSystemViewTest.java:145)

com.willwinder.ugs.nbp.S3FileSystemViewTest.testUploadDownloadFile  Time elapsed: 0.021 s  <<< FAILURE!
org.junit.internal.ArrayComparisonFailure: array lengths differed, expected.length=16 actual.length=0; arrays first differed at element [0]; expected:<67> but was:<end of array>
    at com.willwinder.ugs.nbp.S3FileSystemViewTest.testUploadDownloadFile(S3FileSystemViewTest.java:102)
Caused by: java.lang.AssertionError: expected:<67> but was:<end of array>
    at com.willwinder.ugs.nbp.S3FileSystemViewTest.testUploadDownloadFile(S3FileSystemViewTest.java:102)

com.willwinder.ugs.nbp.S3FileSystemViewTest.txt TEST-com.willwinder.ugs.nbp.S3FileSystemViewTest.xml.txt