Skip to content

Commit 633bc6b

Browse files
committed
fix: default value for LoopController.continue_forever rather than initializing in the constructor
Previously LoopController initialized continue_forever=true in the constructor, however, and ThreadGroup.setMainController flipped the value to false. It caused inconsistency since non-GUI launch does not call ThreadGroup.setMainController. Using default=true enables to treat "false" as non-standard, so =false is saved t the jmx, and it gets loaded in non-GUI as well. Fixes apache#6008
1 parent f96c40d commit 633bc6b

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

src/core/src/main/java/org/apache/jmeter/control/LoopController.java

-4
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ public class LoopController extends GenericController implements Serializable, I
4848

4949
private boolean breakLoop;
5050

51-
public LoopController() {
52-
set(getSchema().getContinueForever(), true);
53-
}
54-
5551
@Override
5652
public LoopControllerSchema getSchema() {
5753
return LoopControllerSchema.INSTANCE;

src/core/src/main/kotlin/org/apache/jmeter/control/LoopControllerSchema.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@ public abstract class LoopControllerSchema : GenericControllerSchema() {
4545
* However, it's not clear that a Thread Group could ever be repeated.
4646
*/
4747
public val continueForever: BooleanPropertyDescriptor<LoopControllerSchema>
48-
by boolean("LoopController.continue_forever")
48+
by boolean("LoopController.continue_forever", default = true /* previous releases initialized value in constructor */)
4949
}

xdocs/changes.xml

+6
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,12 @@ Summary
109109

110110
<ch_section>Bug fixes</ch_section>
111111

112+
<h3>Thread Groups</h3>
113+
<ul>
114+
<li><pr>6011</pr>Regression since 5.6: ThreadGroups are running endlessly in non-gui mode: use default value
115+
for LoopController.continue_forever rather than initializing it in the constructor</li>
116+
</ul>
117+
112118
<h3>HTTP Samplers and Test Script Recorder</h3>
113119
<ul>
114120
</ul>

xdocs/changes_history.xml

+2
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,8 @@ Apologies if we have omitted anyone else.
236236

237237
<ch_section>Known problems and workarounds</ch_section>
238238
<ul>
239+
<li><issue>6008</issue> ThreadGroups are running endlessly in non-gui mode (fixed in 5.6.1, see <pr>6011</pr>)</li>
240+
239241
<li><pr>5987</pr>HTTP sampler sends filenames with percent-encoded UTF-8, however it is not aligned with the browsers. The workaround is to refrain non-ASCII filenames</li>
240242

241243
<li><issue>6004</issue>Java Request sampler cannot be enabled again after disabling in UI (fixed in 5.6.1, <pr>6012</pr>)</li>

0 commit comments

Comments
 (0)