Lines 123-128
Link Here
|
123 |
|
123 |
|
124 |
private volatile Sampler currentSampler; |
124 |
private volatile Sampler currentSampler; |
125 |
|
125 |
|
|
|
126 |
private LoopIterationListener iterationListener; |
127 |
|
128 |
|
126 |
public JMeterThread(HashTree test, JMeterThreadMonitor monitor, ListenerNotifier note) { |
129 |
public JMeterThread(HashTree test, JMeterThreadMonitor monitor, ListenerNotifier note) { |
127 |
this.monitor = monitor; |
130 |
this.monitor = monitor; |
128 |
threadVars = new JMeterVariables(); |
131 |
threadVars = new JMeterVariables(); |
Lines 496-502
Link Here
|
496 |
threadContext.setSamplingStarted(true); |
499 |
threadContext.setSamplingStarted(true); |
497 |
} |
500 |
} |
498 |
controller.initialize(); |
501 |
controller.initialize(); |
499 |
controller.addIterationListener(new IterationListener()); |
502 |
this.iterationListener = new IterationListener(); |
|
|
503 |
controller.addIterationListener(iterationListener); |
500 |
if (!startEarlier) { |
504 |
if (!startEarlier) { |
501 |
threadContext.setSamplingStarted(true); |
505 |
threadContext.setSamplingStarted(true); |
502 |
} |
506 |
} |
Lines 523-528
Link Here
|
523 |
if (gp != null){// check there is a GUI |
527 |
if (gp != null){// check there is a GUI |
524 |
gp.getMainFrame().updateCounts(); |
528 |
gp.getMainFrame().updateCounts(); |
525 |
} |
529 |
} |
|
|
530 |
controller.removeIterationListener(iterationListener); |
526 |
} |
531 |
} |
527 |
|
532 |
|
528 |
private static class ThreadListenerTraverser implements HashTreeTraverser { |
533 |
private static class ThreadListenerTraverser implements HashTreeTraverser { |
Lines 708-714
Link Here
|
708 |
} |
713 |
} |
709 |
} |
714 |
} |
710 |
|
715 |
|
711 |
private void notifyTestListeners() { |
716 |
void notifyTestListeners() { |
712 |
threadVars.incIteration(); |
717 |
threadVars.incIteration(); |
713 |
Iterator<TestListener> iter = testListeners.iterator(); |
718 |
Iterator<TestListener> iter = testListeners.iterator(); |
714 |
while (iter.hasNext()) { |
719 |
while (iter.hasNext()) { |