Markus Spann created SUREFIRE-2082:
--------------------------------------

             Summary: Huge test sets may open too many files
                 Key: SUREFIRE-2082
                 URL: https://issues.apache.org/jira/browse/SUREFIRE-2082
             Project: Maven Surefire
          Issue Type: Bug
          Components: Maven Surefire Plugin
    Affects Versions: 3.0.0-M6
            Reporter: Markus Spann


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 behaviour 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 X{}}}, where X is the maximum number 
of open files).



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to