// Change the ThreadGroup looping to 1 'cos you only need to
// run the JNDISampler once to do reflection
// Ensure that sampleController of ThreadGroup is a LoopController
// which is a certainty but still in case things change in the future
// this should flag it
LoopController lc = null;
if(control instanceof LoopController)
{
lc = (LoopController)control;
lcLoops = lc.getLoops();
lcContinueForever = lc.getContinueForever();
lc.setContinueForever(false);
lc.setLoops(1);
thisThreadGroup.setSamplerController(lc);
}
runThis = false;
jMeterThread = new JMeterThread(thisThreadGroup);
Thread newThread = new Thread(jMeterThread);
newThread.start();
try
{
newThread.join();
}
catch(InterruptedException e)
{
catClass.error(e);
System.out.println(e);
}
lc.setContinueForever(lcContinueForever);
lc.setLoops(lcLoops);
thisThreadGroup.setSamplerController(lc);
}
}
catClass.debug("End : runTest1");
}