Skip to content

Commit

Permalink
fix: default value for LoopController.continue_forever rather than in…
Browse files Browse the repository at this point in the history
…itializing 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
  • Loading branch information
vlsi committed Jun 28, 2023
1 parent f96c40d commit 6cc553f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ public class LoopController extends GenericController implements Serializable, I

private boolean breakLoop;

public LoopController() {
set(getSchema().getContinueForever(), true);
}

@Override
public LoopControllerSchema getSchema() {
return LoopControllerSchema.INSTANCE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ public abstract class LoopControllerSchema : GenericControllerSchema() {
* However, it's not clear that a Thread Group could ever be repeated.
*/
public val continueForever: BooleanPropertyDescriptor<LoopControllerSchema>
by boolean("LoopController.continue_forever")
by boolean("LoopController.continue_forever", default = true /* previous releases initialized value in constructor */)
}
6 changes: 6 additions & 0 deletions xdocs/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ Summary

<ch_section>Bug fixes</ch_section>

<h3>Thread Groups</h3>
<ul>
<li><pr>6011</pr>Regression since 5.6: ThreadGroups are running endlessly in non-gui mode: use default value
for LoopController.continue_forever rather than initializing it in the constructor</li>
</ul>

<h3>HTTP Samplers and Test Script Recorder</h3>
<ul>
</ul>
Expand Down
2 changes: 2 additions & 0 deletions xdocs/changes_history.xml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ Apologies if we have omitted anyone else.

<ch_section>Known problems and workarounds</ch_section>
<ul>
<li><issue>6008</issue> ThreadGroups are running endlessly in non-gui mode (fixed in 5.6.1, see <pr>6011</pr>)</li>

<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>

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

0 comments on commit 6cc553f

Please sign in to comment.