GradleRIO
GradleRIO copied to clipboard
Java unit testing can fail when upgrading project
Describe the bug Unit tests that passed with no problems in 2022.2.1 run into runtime errors in 2022.3.1. The exit code is 137 - a cursory glance of Stack Overflow appears to signify a memory problem. My 2020 Intel i5 MacBook Pro had at least 4 GB of RAM free when running these tests.
To Reproduce Steps to reproduce the behavior:
- Upgrade to WPIlib 2022.3.1
- Attempt to run tests
Expected behavior The tests should run successfully.
Screenshots This video shows the tests passing on 2022.2.1, but failing on 2022.3.1 with no changes to the tests themselves: https://sfsu.app.box.com/file/914364236999?s=93syty80quyeqtd58nc1t3qluy36phlt
Desktop (please complete the following information):
- WPILib Version: 2022.3.1
- OS: macOS Monterey 12.1
- Java version 15.0.1
Ok, I was working with thadhouse and Peter on Discord and in this process it all of the sudden started working for all of us without any clear reason why 👀 👀
Ok, found a more consistent way to cause this error:
1.) Switch version between 2022.2.1 and 2022.3.1
2.) Observe with terror as your unit tests fail with a 137 exit code
3.) Run a ./gradlew clean
4.) Run the tests again and smile with glee as they pass
Thanks to thadhouse on Discord for your help with this! :)
I renamed the issue, and transferred it to the correct repo. I wasn't able to reproduce this on Windows, was only able to reproduce it on macOS. I'm not entirely convinced its not a gatekeeper issue.