@Test(timeout = 1000) public void testZeroThreads() { ConcurrencyThreadGroupExt ctg = new ConcurrencyThreadGroupExt(); ctg.setTargetLevel("0"); ctg.setHold("400000"); ListedHashTree tree = ArrivalsThreadGroupTest.getListedHashTree(ctg, false); ConcurrencyThreadStarter starter = new ConcurrencyThreadStarter(0, null, tree, null, ctg); starter.supplyActiveThreads(); }
@Override protected void supplyActiveThreads() { log.info("Start supplying threads"); if (owner.getTargetLevelAsInt() <= 0) { log.info("ThreadStarter will finish, because target concurrency less than 0."); return; } startTime = System.currentTimeMillis(); boolean isDebugEnabled = log.isDebugEnabled(); while (!owner.isLimitReached() && getPlannedConcurrency(isDebugEnabled) >= 0) { if (isDebugEnabled) { log.debug("Concurrency factual/expected: " + concurrTG.getConcurrency() + "/" + getPlannedConcurrency(isDebugEnabled)); } while (concurrTG.getConcurrency() < getPlannedConcurrency(isDebugEnabled)) { DynamicThread thread = addActiveThread(); concurrTG.threadStarted(thread); } concurrTG.waitThreadStopped(); } log.info("Done supplying threads"); }
ConcurrencyThreadStarter extends AbstractThreadStarter { @Override protected void supplyActiveThreads() { log.info("Start supplying threads"); if (owner.getTargetLevelAsInt() <= 0) { log.info("ThreadStarter will finish, because target concurrency less than 0."); return; } startTime = System.currentTimeMillis(); boolean isDebugEnabled = log.isDebugEnabled(); while (!owner.isLimitReached() && getPlannedConcurrency(isDebugEnabled) >= 0) { if (isDebugEnabled) { log.debug("Concurrency factual/expected: " + concurrTG.getConcurrency() + "/" + getPlannedConcurrency(isDebugEnabled)); } while (concurrTG.getConcurrency() < getPlannedConcurrency(isDebugEnabled)) { DynamicThread thread = addActiveThread(); concurrTG.threadStarted(thread); } concurrTG.waitThreadStopped(); } log.info("Done supplying threads"); } }
ConcurrencyThreadStarter extends AbstractThreadStarter { @Override protected void supplyActiveThreads() { log.info("Start supplying threads"); if (owner.getTargetLevelAsInt() <= 0) { log.info("ThreadStarter will finish, because target concurrency less than 0."); return; } startTime = System.currentTimeMillis(); boolean isDebugEnabled = log.isDebugEnabled(); while (!owner.isLimitReached() && getPlannedConcurrency(isDebugEnabled) >= 0) { if (isDebugEnabled) { log.debug("Concurrency factual/expected: " + concurrTG.getConcurrency() + "/" + getPlannedConcurrency(isDebugEnabled)); } while (concurrTG.getConcurrency() < getPlannedConcurrency(isDebugEnabled)) { DynamicThread thread = addActiveThread(); concurrTG.threadStarted(thread); } concurrTG.waitThreadStopped(); } log.info("Done supplying threads"); } ConcurrencyThreadStarter(int groupIndex, ListenerNotifier listenerNotifier, ListedHashTree testTree, StandardJMeterEngine engine, ConcurrencyThreadGroup concurrencyThreadGroup); }
ConcurrencyThreadStarter extends AbstractThreadStarter { @Override protected void supplyActiveThreads() { log.info("Start supplying threads"); if (owner.getTargetLevelAsInt() <= 0) { log.info("ThreadStarter will finish, because target concurrency less than 0."); return; } startTime = System.currentTimeMillis(); boolean isDebugEnabled = log.isDebugEnabled(); while (!owner.isLimitReached() && getPlannedConcurrency(isDebugEnabled) >= 0) { if (isDebugEnabled) { log.debug("Concurrency factual/expected: " + concurrTG.getConcurrency() + "/" + getPlannedConcurrency(isDebugEnabled)); } while (concurrTG.getConcurrency() < getPlannedConcurrency(isDebugEnabled)) { DynamicThread thread = addActiveThread(); concurrTG.threadStarted(thread); } concurrTG.waitThreadStopped(); } log.info("Done supplying threads"); } ConcurrencyThreadStarter(int groupIndex, ListenerNotifier listenerNotifier, ListedHashTree testTree, StandardJMeterEngine engine, ConcurrencyThreadGroup concurrencyThreadGroup);  }
ConcurrencyThreadStarter extends AbstractThreadStarter { @Override protected void supplyActiveThreads() { log.info("Start supplying threads"); if (owner.getTargetLevelAsInt() <= 0) { log.info("ThreadStarter will finish, because target concurrency less than 0."); return; } startTime = System.currentTimeMillis(); boolean isDebugEnabled = log.isDebugEnabled(); while (!owner.isLimitReached() && getPlannedConcurrency(isDebugEnabled) >= 0) { if (isDebugEnabled) { log.debug("Concurrency factual/expected: " + concurrTG.getConcurrency() + "/" + getPlannedConcurrency(isDebugEnabled)); } while (concurrTG.getConcurrency() < getPlannedConcurrency(isDebugEnabled)) { DynamicThread thread = addActiveThread(); concurrTG.threadStarted(thread); } concurrTG.waitThreadStopped(); } log.info("Done supplying threads"); } ConcurrencyThreadStarter(int groupIndex, ListenerNotifier listenerNotifier, ListedHashTree testTree, StandardJMeterEngine engine, ConcurrencyThreadGroup concurrencyThreadGroup);   }