java.lang.Object
org.apache.maven.plugin.surefire.booterclient.output.ForkClient
All Implemented Interfaces:
EventHandler<Event>

public final class ForkClient extends Object implements EventHandler<Event>
Knows how to reconstruct *all* the state transmitted over stdout by the forked process.
Author:
Kristian Rosenvold
  • Constructor Details

  • Method Details

    • setStopOnNextTestListener

      public void setStopOnNextTestListener(ForkedProcessEventListener listener)
    • 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 seconds
      forkedProcessTimeoutInSeconds - timeout in seconds given by MOJO
    • getDefaultReporterFactory

      public DefaultReporterFactory getDefaultReporterFactory()
    • handleEvent

      public void handleEvent(@Nonnull Event event)
      Specified by:
      handleEvent in interface EventHandler<Event>
    • hadTimeout

      public boolean hadTimeout()
    • getTestVmSystemProperties

      public Map<String,String> getTestVmSystemProperties()
    • getReporter

      public RunListener 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

      public TestOutputReceiver<TestOutputReportEntry> getConsoleOutputReceiver()
    • close

      public void close(boolean hadTimeout)
    • isSaidGoodBye

      public boolean isSaidGoodBye()
    • getErrorInFork

      public StackTraceWriter getErrorInFork()
    • isErrorInFork

      public boolean isErrorInFork()
    • testsInProgress

      public Set<String> testsInProgress()
    • hasTestsInProgress

      public boolean hasTestsInProgress()