private void registerShutdownListener( final TestsToRun testsToRun ) { commandsReader.addShutdownListener( new CommandListener() { @Override public void update( Command command ) { testsToRun.markTestSetFinished(); } } ); }
private void registerPleaseStopListener() { commandsReader.addSkipNextTestsListener( new CommandListener() { @Override public void update( Command command ) { FailFastEventsSingleton.getInstance().setSkipOnNextTest(); } } ); }
public void addByeAckListener( CommandListener listener ) { addListener( BYE_ACK, listener ); }
public TestNGProvider( ProviderParameters bootParams ) { // don't start a thread in CommandReader while we are in in-plugin process commandsReader = bootParams.isInsideFork() ? getReader().setShutdown( bootParams.getShutdown() ) : null; providerParameters = bootParams; testClassLoader = bootParams.getTestClassLoader(); runOrderCalculator = bootParams.getRunOrderCalculator(); providerProperties = bootParams.getProviderProperties(); testRequest = bootParams.getTestRequest(); reporterConfiguration = bootParams.getReporterConfiguration(); scanResult = bootParams.getScanResult(); mainCliOptions = bootParams.getMainCliOptions(); }
commandsReader.awaitStarted(); commandsReader.awaitStarted();
private PingScheduler listenToShutdownCommands( Long ppid ) { commandReader.addShutdownListener( createExitHandler() ); AtomicBoolean pingDone = new AtomicBoolean( true ); commandReader.addNoopListener( createPingHandler( pingDone ) ); PingScheduler pingMechanisms = new PingScheduler( createPingScheduler(), ppid == null ? null : new PpidChecker( ppid ) ); if ( pingMechanisms.pluginProcessChecker != null ) { Runnable checkerJob = processCheckerJob( pingMechanisms ); pingMechanisms.pingScheduler.scheduleWithFixedDelay( checkerJob, 0L, 1L, SECONDS ); } Runnable pingJob = createPingJob( pingDone, pingMechanisms.pluginProcessChecker ); pingMechanisms.pingScheduler.scheduleAtFixedRate( pingJob, 0L, PING_TIMEOUT_IN_SECONDS, SECONDS ); return pingMechanisms; }
private void acknowledgedExit() { final Semaphore barrier = new Semaphore( 0 ); commandReader.addByeAckListener( new CommandListener() { @Override public void update( Command command ) { barrier.release(); } } ); encodeAndWriteToOutput( ( (char) BOOTERCODE_BYE ) + ",0,BYE!\n" ); launchLastDitchDaemonShutdownThread( 0 ); long timeoutMillis = max( systemExitTimeoutInSeconds * ONE_SECOND_IN_MILLIS, ONE_SECOND_IN_MILLIS ); acquireOnePermit( barrier, timeoutMillis ); cancelPingScheduler(); commandReader.stop(); System.exit( 0 ); }
public JUnit4Provider( ProviderParameters bootParams ) { // don't start a thread in CommandReader while we are in in-plugin process commandsReader = bootParams.isInsideFork() ? getReader().setShutdown( bootParams.getShutdown() ) : null; providerParameters = bootParams; testClassLoader = bootParams.getTestClassLoader(); scanResult = bootParams.getScanResult(); runOrderCalculator = bootParams.getRunOrderCalculator(); customRunListeners = bootParams.getProviderProperties().get( "listener" ); jUnit4TestChecker = new JUnit4TestChecker( testClassLoader ); TestRequest testRequest = bootParams.getTestRequest(); testResolver = testRequest.getTestListResolver(); rerunFailingTestsCount = testRequest.getRerunFailingTestsCount(); }
commandsReader.awaitStarted(); commandsReader.awaitStarted();
public JUnit4Provider( ProviderParameters bootParams ) { // don't start a thread in CommandReader while we are in in-plugin process commandsReader = bootParams.isInsideFork() ? getReader().setShutdown( bootParams.getShutdown() ) : null; providerParameters = bootParams; testClassLoader = bootParams.getTestClassLoader(); scanResult = bootParams.getScanResult(); runOrderCalculator = bootParams.getRunOrderCalculator(); customRunListeners = bootParams.getProviderProperties().get( "listener" ); jUnit4TestChecker = new JUnit4TestChecker( testClassLoader ); TestRequest testRequest = bootParams.getTestRequest(); testResolver = testRequest.getTestListResolver(); rerunFailingTestsCount = testRequest.getRerunFailingTestsCount(); }
private void registerShutdownListener( final TestsToRun testsToRun ) { commandsReader.addShutdownListener( new CommandListener() { @Override public void update( Command command ) { testsToRun.markTestSetFinished(); } } ); }
private void registerPleaseStopListener() { commandsReader.addSkipNextTestsListener( new CommandListener() { @Override public void update( Command command ) { FailFastEventsSingleton.getInstance().setSkipOnNextTest(); } } ); }
commandsReader.awaitStarted();
public void addSkipNextTestsListener( CommandListener listener ) { addListener( SKIP_SINCE_NEXT_TEST, listener ); }
public TestNGProvider( ProviderParameters bootParams ) { // don't start a thread in CommandReader while we are in in-plugin process commandsReader = bootParams.isInsideFork() ? getReader().setShutdown( bootParams.getShutdown() ) : null; providerParameters = bootParams; testClassLoader = bootParams.getTestClassLoader(); runOrderCalculator = bootParams.getRunOrderCalculator(); providerProperties = bootParams.getProviderProperties(); testRequest = bootParams.getTestRequest(); reporterConfiguration = bootParams.getReporterConfiguration(); scanResult = bootParams.getScanResult(); mainCliOptions = bootParams.getMainCliOptions(); }
private void registerShutdownListener( final TestsToRun testsToRun ) { commandsReader.addShutdownListener( new CommandListener() { @Override public void update( Command command ) { testsToRun.markTestSetFinished(); } } ); }
private void registerPleaseStopJUnitListener( final Notifier stoppable ) { commandsReader.addSkipNextTestsListener( new CommandListener() { @Override public void update( Command command ) { stoppable.pleaseStop(); } } ); }
commandsReader.awaitStarted();
public void addTestListener( CommandListener listener ) { addListener( RUN_CLASS, listener ); }