Skip to content

Commit

Permalink
Merge pull request apache#207 from tg-freigmbh/master
Browse files Browse the repository at this point in the history
Buffer for more Speed
  • Loading branch information
jaikiran authored Jan 15, 2024
2 parents 60e3661 + 0aa66de commit c44e653
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.junit.platform.launcher.listeners.SummaryGeneratingListener;
import org.junit.platform.launcher.listeners.TestExecutionSummary;

import java.io.BufferedOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
Expand Down Expand Up @@ -257,7 +258,7 @@ private void setupResultFormatter(final TestRequest testRequest, final ListenerD
// set the destination output stream for writing out the formatted result
final java.nio.file.Path resultOutputFile = getListenerOutputFile(testRequest, formatterDefinition);
try {
final OutputStream resultOutputStream = Files.newOutputStream(resultOutputFile);
final OutputStream resultOutputStream = new BufferedOutputStream(Files.newOutputStream(resultOutputFile));
// enroll the output stream to be closed when the execution of the TestRequest completes
testRequest.closeUponCompletion(resultOutputStream);
resultFormatter.setDestination(new KeepAliveOutputStream(resultOutputStream));
Expand Down

0 comments on commit c44e653

Please sign in to comment.