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 MultipleFailureException
private final EventHandler<Event>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) boolean
void
run()
CallsForkClient.handleEvent(Event)
which may throw anyRuntimeException
.
Even ifForkClient
is 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 ifForkClient
is 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)
throwsIOException
and 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 thatForkClient
could hang on waiting for old test to complete and therefore the plugin could be permanently in progress. -
hasErrors
boolean hasErrors() -
throwErrors
- Throws:
IOException
-