We are seeing an issue (using both Gradle 3.2 and Gradle 3.3) that is fairly consistent across all of our build environments (dev builds, jenkins and teamcity) where the TestNG worker process hangs or fails with an OutOfMemoryError.
The test implement uses a thirdparty library, dbunit, that may contains lots and lots of logging (when run previously, we had this debugging mostly depressed). However, I have been able to trace the root of the issues we see to these (even suppressed) log messages seemingly being sent to the Gradle main build process.
The attached jstack output is from a hung worker process. Also, note that when we encounter the OOME in this case, it does not matter how much memory was allocated (I’ve tried up to 16g) and I have had the full test run succeed with a max of only 512m. In addition, upon the OOME, the worker thread still hangs without directly reporting the error (it may be on the individual test log after a CI job has been killed because of timeout). Finally, these worker processes seem to cause issues (especially upon failure) with other jobs running builds due to cache locks (so, the other builds timeout after one minute).
hung-tests.zip (3.9 KB)