Bug 59067 - JMeter fails to iterate over Controllers that are children of a TransactionController having "Generate parent sample" checked after an assertion error occurs on a Thread Group with "Start Next Thread Loop"
Summary: JMeter fails to iterate over Controllers that are children of a TransactionCo...
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.13
Hardware: SGI SunOS
: P2 major (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords: PatchAvailable
: 58983 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-02-25 13:40 UTC by benoit.wiart
Modified: 2016-02-26 21:17 UTC (History)
2 users (show)



Attachments
BROKEN PATCH (2.49 KB, patch)
2016-02-25 15:23 UTC, benoit.wiart
Details | Diff
Test Plan showing issue (4.00 KB, application/xml)
2016-02-26 16:41 UTC, Philippe Mouawad
Details

Note You need to log in before you can comment on or make changes to this bug.
Description benoit.wiart 2016-02-25 13:40:27 UTC
Test Plan is

Thread Group (1 thread, loop count=2, on error start next loop)
   Transaction controller 1 (Generate parent sample = true)
      Transaction controller 2 (Generate parent sample = true)
         Transaction controller 3 (Generate parent sample = true)
            Simple controller
               Http sampler 1
               Http sampler 2
               Http sampler 3
               Http sampler 4
               Http sampler 5
               Http sampler 6

If on first iteration there is an assertion error on sampler 3.
On second iteration the sampler controller starts on sampler 4 and bypass samplers 1,2 and 3.

That's bad and it makes me sad.
Comment 1 benoit.wiart 2016-02-25 14:03:54 UTC
Reduced test case

Thread Group (1 thread, loop count=2, on error start next loop)
   Transaction controller 1 (Generate parent sample = true)
       Simple controller
            Http sampler 1
            Http sampler 2
            Http sampler 3
            Http sampler 4
            Http sampler 5
            Http sampler 6
Comment 2 benoit.wiart 2016-02-25 15:23:07 UTC
Created attachment 33593 [details]
BROKEN PATCH

Broken patch (do not apply) as it doesn't mix well with bug 56811.
You can use it as a basis for the real correction.

The pb is that in JMeterThread#triggerEndOfLoopOnParentControllers the Sampler used is not always the "real" one, but it can be a TransactionSampler, if there is some Simplecontroller between this TransactionSampler and the http sampler, triggerEndOfLoop will not be called for those controllers.

the idea behind the patch is to always do the tree traversal from the real sampler.
Comment 3 benoit.wiart 2016-02-25 15:57:49 UTC
PR https://github.com/apache/jmeter/pull/141

Please review carefully as it may break the world...
Comment 4 Philippe Mouawad 2016-02-26 16:38:49 UTC
Author: pmouawad
Date: Fri Feb 26 16:38:10 2016
New Revision: 1732514

URL: http://svn.apache.org/viewvc?rev=1732514&view=rev
Log:
Bug 59067 - JMeter fails to iterate over Controllers that are children of a TransactionController having "Generate parent sample" checked after an assertion error occurs on a Thread Group with "Start Next Thread Loop"
Bugzilla Id: 59067

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/control/TransactionController.java
    jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java
    jmeter/trunk/xdocs/changes.xml
Comment 5 Philippe Mouawad 2016-02-26 16:41:27 UTC
Created attachment 33599 [details]
Test Plan showing issue
Comment 6 Philippe Mouawad 2016-02-26 21:17:33 UTC
*** Bug 58983 has been marked as a duplicate of this bug. ***