[GitHub] maven-surefire pull request #147: Reporters use buffers to reduce number of ...
Github user jerrinot closed the pull request at: https://github.com/apache/maven-surefire/pull/147 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven-surefire pull request #147: Reporters use buffers to reduce number of ...
Github user jerrinot commented on a diff in the pull request: https://github.com/apache/maven-surefire/pull/147#discussion_r111679651 --- Diff: maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java --- @@ -292,15 +293,15 @@ private FileOutputStream getOutputStream( WrappedReportEntry testSetReportEntry try { -return new FileOutputStream( reportFile ); +return new BufferedOutputStream( new FileOutputStream( reportFile ), 16 * 1024 ); --- End diff -- Is this relevant for this changeset? I agree the reporter should use either directly the stream or the writer. However I see this as a separate problem. I can have a look at it as well, but it appears rather tricky and I would like to have it isolated from this very change. See this part: https://github.com/jerrinot/maven-surefire/blob/b66b524a42d6cbc2b23225d72b67671d25d3fc05/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java#L442-L442 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven-surefire pull request #147: Reporters use buffers to reduce number of ...
Github user jerrinot commented on a diff in the pull request: https://github.com/apache/maven-surefire/pull/147#discussion_r111679608 --- Diff: maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/ConsoleOutputFileReporter.java --- @@ -91,7 +93,7 @@ public void writeTestOutput( byte[] buf, int off, int len, boolean stdout ) reportsDirectory.mkdirs(); } File file = getReportFile( reportsDirectory, reportEntryName, reportNameSuffix, "-output.txt" ); -fileOutputStream = new FileOutputStream( file ); +fileOutputStream = new BufferedOutputStream( new FileOutputStream( file ), 16 * 1024 ); --- End diff -- fixed. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven-surefire pull request #147: Reporters use buffers to reduce number of ...
Github user Tibor17 commented on a diff in the pull request: https://github.com/apache/maven-surefire/pull/147#discussion_r111644325 --- Diff: maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java --- @@ -292,15 +293,15 @@ private FileOutputStream getOutputStream( WrappedReportEntry testSetReportEntry try { -return new FileOutputStream( reportFile ); +return new BufferedOutputStream( new FileOutputStream( reportFile ), 16 * 1024 ); --- End diff -- I think we have problem. `FileOutputStream outputStream = getOutputStream( testSetReportEntry );` `OutputStreamWriter fw = getWriter( outputStream );` Both variables are in use which is bad and the only one should be used. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven-surefire pull request #147: Reporters use buffers to reduce number of ...
Github user Tibor17 commented on a diff in the pull request: https://github.com/apache/maven-surefire/pull/147#discussion_r111643377 --- Diff: maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/ConsoleOutputFileReporter.java --- @@ -91,7 +93,7 @@ public void writeTestOutput( byte[] buf, int off, int len, boolean stdout ) reportsDirectory.mkdirs(); } File file = getReportFile( reportsDirectory, reportEntryName, reportNameSuffix, "-output.txt" ); -fileOutputStream = new FileOutputStream( file ); +fileOutputStream = new BufferedOutputStream( new FileOutputStream( file ), 16 * 1024 ); --- End diff -- Sorry, I mean this in `FileReporter.java`. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[GitHub] maven-surefire pull request #147: Reporters use buffers to reduce number of ...
Github user Tibor17 commented on a diff in the pull request: https://github.com/apache/maven-surefire/pull/147#discussion_r111643120 --- Diff: maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/ConsoleOutputFileReporter.java --- @@ -91,7 +93,7 @@ public void writeTestOutput( byte[] buf, int off, int len, boolean stdout ) reportsDirectory.mkdirs(); } File file = getReportFile( reportsDirectory, reportEntryName, reportNameSuffix, "-output.txt" ); -fileOutputStream = new FileOutputStream( file ); +fileOutputStream = new BufferedOutputStream( new FileOutputStream( file ), 16 * 1024 ); --- End diff -- Can you please override (git amend) this commit and add Writer.close() in finally block? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org