Class ForkClient
java.lang.Object
org.apache.maven.plugin.surefire.booterclient.output.ForkClient
- All Implemented Interfaces:
EventHandler<Event>
Knows how to reconstruct *all* the state transmitted over stdout by the forked process.
- Author:
- Kristian Rosenvold
-
Constructor Summary
ConstructorsConstructorDescriptionForkClient
(DefaultReporterFactory defaultReporterFactory, NotifiableTestStream notifiableTestStream, int forkNumber) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close
(boolean hadTimeout) Used when getting reporters on the plugin side of a fork.boolean
void
handleEvent
(Event event) boolean
boolean
boolean
void
kill()
void
void
tryToTimeout
(long currentTimeMillis, int forkedProcessTimeoutInSeconds) Called in concurrent Thread.
-
Constructor Details
-
ForkClient
public ForkClient(DefaultReporterFactory defaultReporterFactory, NotifiableTestStream notifiableTestStream, int forkNumber)
-
-
Method Details
-
setStopOnNextTestListener
-
kill
public void kill() -
tryToTimeout
public void tryToTimeout(long currentTimeMillis, int forkedProcessTimeoutInSeconds) Called in concurrent Thread. Will shutdown if timeout was reached.- Parameters:
currentTimeMillis
- current time in millis secondsforkedProcessTimeoutInSeconds
- timeout in seconds given by MOJO
-
getDefaultReporterFactory
-
handleEvent
- Specified by:
handleEvent
in interfaceEventHandler<Event>
-
hadTimeout
public boolean hadTimeout() -
getTestVmSystemProperties
-
getReporter
Used when getting reporters on the plugin side of a fork. Used by testing purposes only. May not be volatile variable.- Returns:
- A mock provider reporter
-
getConsoleOutputReceiver
-
close
public void close(boolean hadTimeout) -
isSaidGoodBye
public boolean isSaidGoodBye() -
getErrorInFork
-
isErrorInFork
public boolean isErrorInFork() -
testsInProgress
-
hasTestsInProgress
public boolean hasTestsInProgress()
-