You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by vl...@apache.org on 2023/06/28 09:03:00 UTC
[jmeter] 01/02: fix: default value for LoopController.continue_forever rather than initializing in the constructor
This is an automated email from the ASF dual-hosted git repository.
vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git
commit 6cc553f46838f4c3cfef2b0a6545ee4dda80c808
Author: Vladimir Sitnikov <si...@gmail.com>
AuthorDate: Tue Jun 27 07:50:40 2023 +0300
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 https://github.com/apache/jmeter/issues/6008
---
.../src/main/java/org/apache/jmeter/control/LoopController.java | 4 ----
.../main/kotlin/org/apache/jmeter/control/LoopControllerSchema.kt | 2 +-
xdocs/changes.xml | 6 ++++++
xdocs/changes_history.xml | 2 ++
4 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/core/src/main/java/org/apache/jmeter/control/LoopController.java b/src/core/src/main/java/org/apache/jmeter/control/LoopController.java
index bde3aa19e8..c973cf4d74 100644
--- a/src/core/src/main/java/org/apache/jmeter/control/LoopController.java
+++ b/src/core/src/main/java/org/apache/jmeter/control/LoopController.java
@@ -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;
diff --git a/src/core/src/main/kotlin/org/apache/jmeter/control/LoopControllerSchema.kt b/src/core/src/main/kotlin/org/apache/jmeter/control/LoopControllerSchema.kt
index 3eea874f77..23c0e09551 100644
--- a/src/core/src/main/kotlin/org/apache/jmeter/control/LoopControllerSchema.kt
+++ b/src/core/src/main/kotlin/org/apache/jmeter/control/LoopControllerSchema.kt
@@ -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 */)
}
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 5917eae9ff..f4fa544022 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -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>
diff --git a/xdocs/changes_history.xml b/xdocs/changes_history.xml
index 78c3adb9e3..deae2544ed 100644
--- a/xdocs/changes_history.xml
+++ b/xdocs/changes_history.xml
@@ -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>