@Test public void testStopThread() { System.out.println("stopThread"); String threadName = ""; boolean now = false; AbstractSimpleThreadGroup instance = new AbstractSimpleThreadGroupImpl(); boolean expResult = false; boolean result = instance.stopThread(threadName, now); assertEquals(expResult, result); }
@Override public boolean stopThread(String threadName, boolean now) { for (Entry<JMeterThread, Thread> entry : allThreads.entrySet()) { JMeterThread thrd = entry.getKey(); if (thrd.getThreadName().equals(threadName)) { thrd.stop(); thrd.interrupt(); if (now) { Thread t = entry.getValue(); if (t != null) { t.interrupt(); } } return true; } } return false; }
AbstractSimpleThreadGroup extends AbstractThreadGroup { @Override public boolean stopThread(String threadName, boolean now) { for (Entry<JMeterThread, Thread> entry : allThreads.entrySet()) { JMeterThread thrd = entry.getKey(); if (thrd.getThreadName().equals(threadName)) { thrd.stop(); thrd.interrupt(); if (now) { Thread t = entry.getValue(); if (t != null) { t.interrupt(); } } return true; } } return false; } }
AbstractSimpleThreadGroup extends AbstractThreadGroup { @Override public boolean stopThread(String threadName, boolean now) { for (Entry<JMeterThread, Thread> entry : allThreads.entrySet()) { JMeterThread thrd = entry.getKey(); if (thrd.getThreadName().equals(threadName)) { thrd.stop(); thrd.interrupt(); if (now) { Thread t = entry.getValue(); if (t != null) { t.interrupt(); } } return true; } } return false; } AbstractSimpleThreadGroup(); }
AbstractSimpleThreadGroup extends AbstractThreadGroup { @Override public boolean stopThread(String threadName, boolean now) { for (Entry<JMeterThread, Thread> entry : allThreads.entrySet()) { JMeterThread thrd = entry.getKey(); if (thrd.getThreadName().equals(threadName)) { thrd.stop(); thrd.interrupt(); if (now) { Thread t = entry.getValue(); if (t != null) { t.interrupt(); } } return true; } } return false; } AbstractSimpleThreadGroup(); void scheduleThread(JMeterThread thread); @Override void start(int groupNum, ListenerNotifier notifier, ListedHashTree threadGroupTree, StandardJMeterEngine engine); @Override boolean stopThread(String threadName, boolean now); @Override void threadFinished(JMeterThread thread); @Override void tellThreadsToStop(); @Override void stop(); @Override int numberOfActiveThreads(); @Override boolean verifyThreadsStopped(); @Override void waitThreadsStopped(); }
AbstractSimpleThreadGroup extends AbstractThreadGroup { @Override public boolean stopThread(String threadName, boolean now) { for (Entry<JMeterThread, Thread> entry : allThreads.entrySet()) { JMeterThread thrd = entry.getKey(); if (thrd.getThreadName().equals(threadName)) { thrd.stop(); thrd.interrupt(); if (now) { Thread t = entry.getValue(); if (t != null) { t.interrupt(); } } return true; } } return false; } AbstractSimpleThreadGroup(); void scheduleThread(JMeterThread thread); @Override void start(int groupNum, ListenerNotifier notifier, ListedHashTree threadGroupTree, StandardJMeterEngine engine); @Override boolean stopThread(String threadName, boolean now); @Override void threadFinished(JMeterThread thread); @Override void tellThreadsToStop(); @Override void stop(); @Override int numberOfActiveThreads(); @Override boolean verifyThreadsStopped(); @Override void waitThreadsStopped(); static final String THREAD_GROUP_DISTRIBUTED_PREFIX_PROPERTY_NAME; }