Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0.0-M6
Description
Test sets with a very large number of tests (such as a JUnit ParameterizedTest with a large number of test inputs) cause surefire to open a file for stdout and another file for stderr as soon as a test method prints to either of these output streams.
Surefire captures stdout and stderr in temporary files.
These file handles are kept until the very end of the test set (TestSetRunListener.testSetCompleted) which may cause the limit of open files to be reached on a system, resulting in test errors (java.nio.file.FileSystemException, too many open files).
This behavior may have been introduced with the performance improvements of SUREFIRE-1845.
To reproduce, set the maximum allowed open files to a value lower than test iterations in a test class:
ulimit -n <limit>
where limit is the maximum number of open files for a user (Linux).
Attachments
Issue Links
- duplicates
-
SUREFIRE-2094 Leaked file descriptors
- Closed
- is duplicated by
-
SUREFIRE-2094 Leaked file descriptors
- Closed
- links to