apache / apache/jmeter

Inconsistent behavior when Thread Group "forever" and "loop count" value set at the same time

Open
#5,161 0 comments 0 reactions 0 assignees View on GitHub
os: Linux P2
Dominant language
Java
Stars
9.5k
Forks
2.3k
Avg merge
1d 22h
Merged PRs (30d)
5

Description

**Nicolas** ([Bug 63755](https://bz.apache.org/bugzilla//show_bug.cgi?id=63755&redirect=false)):
In GUI, in the Thread Group configuration, it is not possible to check "forever" loop count at the same time that "loop count" value is set, OK.

However, by editing the XML ".jmx" file, this is possible to define both values.

So assuming that I have this XML :
<stringProp name="ThreadGroup.on_sample_error">startnextloop</stringProp>
<boolProp name="LoopController.continue_forever">true</boolProp>
<stringProp name="LoopController.loops">1</stringProp>

when I start Jmeter, everything is OK, the thread is going on indefinitely.
BUT... as soon as I get an error, this thread became a "zombie" thread.

It seems that the "ThreadGroup.on_sample_error=startnextloop" configuration is based on the "LoopController.loops" configuration first, rather than on the "LoopController.continue_forever" configuration. Moreover, under this circumstances, the test is not able to finish alone at all : this thread is still considered as "active" by jmeter, until a shutdown signal occurs.

I suggest to fix the "ThreadGroup.on_sample_error" behavior, in order for it to consider the value of "LoopController.continue_forever" prior to "LoopController.loops"

Severity: major
OS: Linux

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.