@Override public void testStarted() { if (JMeter.isNonGUI()) { out = System.out; } else { out = new JMeterLoggerOutputStream(log); } cur = 0; }
@Override public void testStarted() { if (JMeter.isNonGUI()) { out = System.out; } else { out = new JMeterLoggerOutputStream(log); } cur = 0; }
@Override public void run() { running = false; resetSingletonEngine(); if (now) { tellThreadGroupsToStop(); pause(10L * countStillActiveThreads()); boolean stopped = verifyThreadsStopped(); if (!stopped) { // we totally failed to stop the test if (JMeter.isNonGUI()) { // TODO should we call test listeners? That might hang too ... log.error(JMeterUtils.getResString("stopping_test_failed")); //$NON-NLS-1$ if (SYSTEM_EXIT_ON_STOP_FAIL) { // default is true log.error("Exiting"); System.out.println("Fatal error, could not stop test, exiting"); // NOSONAR Intentional System.exit(1); // NOSONAR Intentional } else { System.out.println("Fatal error, could not stop test"); // NOSONAR Intentional } } else { JMeterUtils.reportErrorToUser( JMeterUtils.getResString("stopping_test_failed"), //$NON-NLS-1$ JMeterUtils.getResString("stopping_test_title")); //$NON-NLS-1$ } } // else will be done by threadFinished() } else { stopAllThreadGroups(); } } }
if (JMeter.isNonGUI() && SYSTEM_EXIT_FORCED) { log.info("Forced JVM shutdown requested at end of test"); System.exit(0); // NOSONAR Intentional
private void stopTest() { stopTries++; if (JMeter.isNonGUI()) { log.info("Stopping JMeter via UDP call"); stopTestViaUDP("StopTestNow"); } else { if (stopTries > 10) { log.info("Tries more than 10, stop it NOW!"); StandardJMeterEngine.stopEngineNow(); } else if (stopTries > 5) { log.info("Tries more than 5, stop it!"); StandardJMeterEngine.stopEngine(); } else { JMeterContextService.getContext().getEngine().askThreadsToStop(); } } }
private void stopTest() { stopTries++; if (JMeter.isNonGUI()) { log.info("Stopping JMeter via UDP call"); stopTestViaUDP("StopTestNow"); } else { if (stopTries > 10) { log.info("Tries more than 10, stop it NOW!"); StandardJMeterEngine.stopEngineNow(); } else if (stopTries > 5) { log.info("Tries more than 5, stop it!"); StandardJMeterEngine.stopEngine(); } else { JMeterContextService.getContext().getEngine().askThreadsToStop(); } } }