You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jakarta.apache.org by bu...@apache.org on 2010/09/30 19:52:41 UTC

DO NOT REPLY [Bug 50032] New: Last_Sample_Ok along with other controllers doesnt work correctly when the threadgroup has multiple loops

https://issues.apache.org/bugzilla/show_bug.cgi?id=50032

           Summary: Last_Sample_Ok along with other controllers doesnt
                    work correctly when the threadgroup has multiple loops
           Product: JMeter
           Version: 2.4
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
        AssignedTo: notifications@jakarta.apache.org
        ReportedBy: shettyd@gmail.com


Created an attachment (id=26105)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26105)
Simplified test plan showing the issue

if the test plan is
Thread Group (Thread = 1 , Loop =2)
+Sample1
+If Controller (${JMeterThread.last_sample_ok})
++Sample2
++Sample3  (always fails)
++Sample4  (always fails)
Then the test plan executes correctly (i.e. Result is Sample1, Sample2,
Sample3(failed) ,Sample1, Sample2, Sample3(failed)


However if now we add a Simple Controller so that the plan is
Thread Group (Thread = 1 , Loop =2)
+Sample1
+If Controller (${JMeterThread.last_sample_ok})
++Sample2
++Simple Controller
+++Sample3  (always fails)
+++Sample4  (always fails)

Then the test plan executes incorrectly(i.e. Result is Sample1, Sample2,
Sample3(failed) ,Sample1, Sample2, Sample4(failed)

The only workaround I can see is to not have the simple controller (but other
controllers like the IF will similarly impact the behavior so this isnt very
viable)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 50032] Last_Sample_Ok along with other controllers doesnt work correctly when the threadgroup has multiple loops

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50032

--- Comment #12 from Milamber <mi...@apache.org> 2011-09-14 16:44:07 UTC ---
URL: http://svn.apache.org/viewvc?rev=1170707&view=rev
Log:
Add two knows issues : bug 50032 and bug 50618

Modified:
    jakarta/jmeter/trunk/xdocs/changes.xml

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 50032] Last_Sample_Ok along with other controllers doesnt work correctly when the threadgroup has multiple loops

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50032

--- Comment #15 from Milamber <mi...@apache.org> 2011-09-17 15:09:46 UTC ---
Thanks for patch (even if it didn't follow code style :))
Applied.

Now, I close the bug. Thanks Phillippe.

URL: http://svn.apache.org/viewvc?rev=1171999&view=rev
Log:
Bug 50032 - Fixed a new regression introduced by bug 50032 when Transaction
Controller is a child of If Controller

Modified:
   
jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/GenericController.java
   
jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/TransactionController.java
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContext.java
    jakarta/jmeter/trunk/xdocs/changes.xml

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 50032] Last_Sample_Ok along with other controllers doesnt work correctly when the threadgroup has multiple loops

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50032

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #6 from Philippe Mouawad <p....@ubik-ingenierie.com> 2011-09-12 07:12:07 UTC ---
Hello,
This patch introduced a regression on IfController.
Attached is a scenario that shows how an Infinite Loop will occur when a
IfController contains a TransactionController.
If condition evaluates to false, reInitializeSubController will loop
infinitely.

I don't know if this reopening is a duplicate of 50618 but maybe another
manifestation of the regression.

Regards
Philippe Mouawad

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 50032] Last_Sample_Ok along with other controllers doesnt work correctly when the threadgroup has multiple loops

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50032

--- Comment #13 from Philippe Mouawad <p....@ubik-ingenierie.com> 2011-09-17 12:36:29 UTC ---
Created attachment 27519
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27519
Fix to the issue where If Controller generates additional samples for children
Transaction Controller inside when condition is false

Hello,
Here is a fix to the known issue related to this bug:
-If Controller generates additional samples for children Transaction Controller
inside when condition is false.

Here is how it works, once a thread enters reInitializeSubController() it flags
the JMeterThreadContext if it's the first Parent.
In TransactionController listeners will not be notified that a sample occured
since it didn't .
Once the first Parent has finished reinitializing, it unsets the flag in
finally.

I tested with attached JMX and it works.
Regards
Philippe

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 50032] Last_Sample_Ok along with other controllers doesnt work correctly when the threadgroup has multiple loops

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50032

Milamber <mi...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 50032] Last_Sample_Ok along with other controllers doesnt work correctly when the threadgroup has multiple loops

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50032

--- Comment #5 from Milamber <mi...@apache.org> 2011-01-21 03:26:14 EST ---
URL: http://svn.apache.org/viewvc?rev=1061679&view=rev
Log:
No need to return a value (improving patch Bug 50032)

Modified:
   
jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/GenericController.java
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/IfController.java

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 50032] Last_Sample_Ok along with other controllers doesnt work correctly when the threadgroup has multiple loops

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50032

--- Comment #14 from Milamber <mi...@apache.org> 2011-09-17 15:06:22 UTC ---
Philippe, your patch don't respect code style used in JMeter. 

== No good ==
         }
         finally
         {
== Good ==
         } finally {
==========



== No good ==
         if(isReinitializingSubControllers)
         {
             isReinitializingSubControllers = false;
         }
         else
         {
             log.warn("Unsetting while flag is not true");
         }
== Good ==
         if (isReinitializingSubControllers) {  // please note: one space
before left parenthesis
             isReinitializingSubControllers = false;
         } else {
             log.warn("Unsetting while flag is not true");
         }
=======

Comments on source code don't need have all characters in uppercase

=======

"@see" must follow by a classname, not a "ISSUE" keyword.

Please respect code style convention in JMeter for next submissions. Thanks.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 50032] Last_Sample_Ok along with other controllers doesnt work correctly when the threadgroup has multiple loops

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50032

--- Comment #11 from Philippe Mouawad <p....@ubik-ingenierie.com> 2011-09-14 07:17:12 UTC ---
Thank you for applying.
Maybe a note should be added in Known issues regarding the incomplete fix of
this isssue:
- Currently it generates additional samples for transactions inside
IfCOntroller due to the call to nextIsAController() inside
reInitializeSubController.

Even if sampler are not run.
I don't know if you close this issue and open another bug or you keep this one
opened.

Regards
Philippe

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 50032] Last_Sample_Ok along with other controllers doesnt work correctly when the threadgroup has multiple loops

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50032

--- Comment #16 from Philippe Mouawad <p....@ubik-ingenierie.com> 2011-09-17 15:16:56 UTC ---
I am sorry for not respecting, I missed it.
I will take care next time, anyway thanks for taking it as is.
Regards
Philippe.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 50032] Last_Sample_Ok along with other controllers doesnt work correctly when the threadgroup has multiple loops

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50032

--- Comment #7 from Philippe Mouawad <p....@ubik-ingenierie.com> 2011-09-12 07:13:09 UTC ---
Created attachment 27486
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27486
Shows the issue

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 50032] Last_Sample_Ok along with other controllers doesnt work correctly when the threadgroup has multiple loops

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50032

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P1
           Platform|PC                          |All
            Version|2.4                         |2.5
         OS/Version|Windows XP                  |All

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 50032] Last_Sample_Ok along with other controllers doesnt work correctly when the threadgroup has multiple loops

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50032

--- Comment #1 from Milamber <mi...@apache.org> 2010-10-09 17:18:40 EDT ---
Created an attachment (id=26151)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26151)
Proposal patch

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 50032] Last_Sample_Ok along with other controllers doesnt work correctly when the threadgroup has multiple loops

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50032

--- Comment #8 from Philippe Mouawad <p....@ubik-ingenierie.com> 2011-09-12 07:13:35 UTC ---
Created attachment 27487
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27487
CSV file to use with Regression-Script.jmx.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 50032] Last_Sample_Ok along with other controllers doesnt work correctly when the threadgroup has multiple loops

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50032

Milamber <mi...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #4 from Milamber <mi...@apache.org> 2010-10-11 17:34:30 EDT ---
Thanks; fixed in SVN (and next nightly build):

URL: http://svn.apache.org/viewvc?rev=1021512&view=rev
Log:
Bug 50032 - Last_Sample_Ok along with other controllers doesnt work correctly
when the threadgroup has multiple loops

Modified:
   
jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/GenericController.java
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/IfController.java
   
jakarta/jmeter/trunk/test/src/org/apache/jmeter/control/TestIfController.java

URL: http://svn.apache.org/viewvc?rev=1021514&view=rev

Modified:
    jakarta/jmeter/trunk/xdocs/changes.xml

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 50032] Last_Sample_Ok along with other controllers doesnt work correctly when the threadgroup has multiple loops

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50032

--- Comment #3 from Sebb <se...@apache.org> 2010-10-11 12:16:43 EDT ---
Patch looks fine to me, except that I think the method
reInitializeSubController() should be protected rather than public.

[It can always be made public later if it proves necessary.]

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 50032] Last_Sample_Ok along with other controllers doesnt work correctly when the threadgroup has multiple loops

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50032

--- Comment #2 from Milamber <mi...@apache.org> 2010-10-09 17:19:07 EDT ---
Thanks for your report and test script.

This bug comes from a Simple controller's index which is not reinitialized on
loop 2 (the next is sample 4 - not the sample 3)
Solution: when "If Controller" breaks tree execution (after Sample 3 fails) run
a reinitialization indexes on sub-controllers.

in attachment, a proposal patch.
@sebb: have you a comment before I commit the patch?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 50032] Last_Sample_Ok along with other controllers doesnt work correctly when the threadgroup has multiple loops

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50032

--- Comment #10 from Milamber <mi...@apache.org> 2011-09-13 23:36:46 UTC ---
(In reply to comment #6)

Thanks. Fixed.

URL: http://svn.apache.org/viewvc?rev=1170388&view=rev
Log:
If Controller - Fixed a regression introduce by bug 50032
See: https://issues.apache.org/bugzilla/show_bug.cgi?id=50032#c6
and https://issues.apache.org/bugzilla/show_bug.cgi?id=50618#c28

Modified:
   
jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/GenericController.java
    jakarta/jmeter/trunk/xdocs/changes.xml

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


DO NOT REPLY [Bug 50032] Last_Sample_Ok along with other controllers doesnt work correctly when the threadgroup has multiple loops

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50032

--- Comment #9 from Philippe Mouawad <p....@ubik-ingenierie.com> 2011-09-12 09:19:52 UTC ---
Hello,
There is another issue with patch, it's that it generates additional samples
for transactions inside IfCOntroller due to the call to nextIsAController()
inside reInitializeSubController.

For example when line in CSV is equal to 0, I get in "View Results Tree" calls
to:
- s3-createAddressAndHousing
- S3-createLegalEntityAddress

although sampler inside these are not executed.

Regards
Philippe

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org