You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Markus Spann (Jira)" <ji...@apache.org> on 2022/05/06 09:24:00 UTC
[jira] [Updated] (SUREFIRE-2082) Huge test sets may open too many files
[ 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 X{}}}, where X is the maximum number of open files).
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 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).
> 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 X{}}}, where X is the maximum number of open files).
--
This message was sent by Atlassian Jira
(v8.20.7#820007)