[
https://issues.apache.org/jira/browse/SUREFIRE-2082?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Markus Spann updated SUREFIRE-2082:
-----------------------------------
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).
was:
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 X{}}}, where X is the maximum number
of open files).
> 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
> Priority: Major
>
> 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).
--
This message was sent by Atlassian Jira
(v8.20.7#820007)