rmannibucau commented on a change in pull request #305:
URL: https://github.com/apache/maven-surefire/pull/305#discussion_r451510317



##########
File path: 
surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkedBooter.java
##########
@@ -129,6 +134,34 @@ private void setupBooter( String tmpDir, String 
dumpFileName, String surefirePro
 
         flushEventChannelOnExit();
 
+        final Long outputFlushInterval = 
providerConfiguration.getOutputFlushInterval();
+        if ( outputFlushInterval != null && outputFlushInterval > 0
+            && LegacyMasterProcessChannelEncoder.class.isInstance( 
eventChannel ) )
+        {
+            final LegacyMasterProcessChannelEncoder enc = 
LegacyMasterProcessChannelEncoder.class.cast( eventChannel );
+            flusher = Executors.newSingleThreadScheduledExecutor( 
DaemonThreadFactory.newDaemonThreadFactory() );
+            flusher.scheduleAtFixedRate( new Runnable()
+            {
+                @Override
+                public void run()
+                {
+                    final WritableBufferedByteChannel c = 
WritableBufferedByteChannel.class.cast( enc.getOut() );
+                    try
+                    {
+                        if ( c.isOpen() )

Review comment:
       this is a SPI (so user facing) so didn't want to modify it since this is 
really a workaround :s




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to