Class ThreadedStreamConsumer.Pumper
java.lang.Object
org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer.Pumper
- All Implemented Interfaces:
Runnable
- Enclosing class:
ThreadedStreamConsumer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MultipleFailureExceptionprivate final EventHandler<Event> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) booleanvoidrun()CallsForkClient.handleEvent(Event)which may throw anyRuntimeException.
Even ifForkClientis not fault-tolerant, this method MUST be fault-tolerant and thus the try-catch block must be inside of the loop which prevents from loosing events fromEventHandler.(package private) void
-
Field Details
-
target
-
errors
-
-
Constructor Details
-
Pumper
Pumper(EventHandler<Event> target)
-
-
Method Details
-
run
public void run()CallsForkClient.handleEvent(Event)which may throw anyRuntimeException.
Even ifForkClientis not fault-tolerant, this method MUST be fault-tolerant and thus the try-catch block must be inside of the loop which prevents from loosing events fromEventHandler.
IfConsoleOutputFileReporter.writeTestOutput(org.apache.maven.surefire.api.report.TestOutputReportEntry)throwsIOExceptionand thentarget.consumeLine()throws any RuntimeException, this method MUST NOT skip reading the events from the forked JVM; otherwise we could simply lost events e.g. acquire-next-test which means thatForkClientcould hang on waiting for old test to complete and therefore the plugin could be permanently in progress. -
hasErrors
boolean hasErrors() -
throwErrors
- Throws:
IOException
-