Lines 137-152
Link Here
|
137 |
} |
138 |
} |
138 |
|
139 |
|
139 |
/** |
140 |
/** |
140 |
* @see org.apache.jmeter.control.Controller#next() 'JMeterThread' iterates |
141 |
* @see org.apache.jmeter.control.Controller#next() |
141 |
* thru the Controller by calling this method. IF a valid 'Sampler' is |
|
|
142 |
* returned, then it executes the sampler (calls sampler.sampler(xxx) |
143 |
* method) . So here we make sure that the samplers belonging to this |
144 |
* Controller do not get called - if isDone is true - if its the first |
145 |
* time this is run. The first time is special cause it is called prior |
146 |
* the iteration even starts ! |
147 |
*/ |
142 |
*/ |
148 |
public Sampler next() { |
143 |
public Sampler next() { |
149 |
boolean result = evaluateCondition(getCondition()); |
144 |
// We should only evalute the condition if it is the first |
|
|
145 |
// time ( first "iteration" ) we are called. |
146 |
// For subsequent calls, we are inside the IfControllerGroup, |
147 |
// so then we just pass the control to the next item inside the if control |
148 |
boolean result = true; |
149 |
if(isFirst()) { |
150 |
result = evaluateCondition(getCondition()); |
151 |
} |
152 |
|
150 |
if (result) { |
153 |
if (result) { |
151 |
return super.next(); |
154 |
return super.next(); |
152 |
} |
155 |
} |
Lines 156-159
Link Here
|
156 |
return null; |
159 |
return null; |
157 |
} |
160 |
} |
158 |
} |
161 |
} |
159 |
} |
162 |
} |