Bug 56276 - Loop controller becomes broken once loop count evaluates to zero
Summary: Loop controller becomes broken once loop count evaluates to zero
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.10
Hardware: All All
: P2 major (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
Depends on:
Reported: 2014-03-17 14:20 UTC by Vladimir Ryabtsev
Modified: 2014-03-22 21:22 UTC (History)
1 user (show)

Demonstration of bug and workaround (9.27 KB, text/xml)
2014-03-17 14:20 UTC, Vladimir Ryabtsev

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Ryabtsev 2014-03-17 14:20:49 UTC
Created attachment 31394 [details]
Demonstration of bug and workaround

I use a Jmeter variable for the value of Loop Count field. Loop Controller works correctly until first zero-value iteration counter. When meeting one, Loop Controller does nothin (correct) but after that it becomes broken in current thread group till the end of test: even when Loop Counter becomes non-zero Loop Controller does nothing (incorrect).

Run attached test plan and inspect Results Tree. Play with "if (iterCounter == 3)" condition and change "vars.put("num_loops",Integer.toString(0));" to any non-zero value and see that it stops breaking.

Bug appears in versions 2.10 and 2.11, and does not appear in version 2.9.


Put Loop Controller inside If Controller to avoid passing zero values to Loop Counter (this shown in WORKAROUND thread group in attached test plan).
Comment 1 Vladimir Ryabtsev 2014-03-17 14:43:57 UTC
Bug is also reproduced in nightly build r1578205.
Comment 2 Vladimir Ryabtsev 2014-03-18 06:57:57 UTC
Got the information that workaround does not work at some cases.
Comment 3 Philippe Mouawad 2014-03-18 23:18:42 UTC
Note issue was introduced by fix to 54467
Comment 4 Philippe Mouawad 2014-03-18 23:19:03 UTC
Date: Tue Mar 18 23:17:14 2014
New Revision: 1579084

URL: http://svn.apache.org/r1579084
Bug 56276 - Loop controller becomes broken once loop count evaluates to zero
Bugzilla Id: 56276

Comment 5 Vladimir Ryabtsev 2014-03-19 08:07:12 UTC
Verified in nightly build r1579114: FIXED.
Comment 6 Philippe Mouawad 2014-03-22 21:22:38 UTC
Thanks for report and tests.

Date: Sat Mar 22 21:21:44 2014
New Revision: 1580330

URL: http://svn.apache.org/r1580330
update thanks section