You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2020/07/25 20:26:27 UTC

[Bug 64627] New: Programmatic manipulation of the control flow via API methods of JMeterContext is not working as it used to before 5.0

https://bz.apache.org/bugzilla/show_bug.cgi?id=64627

            Bug ID: 64627
           Summary: Programmatic manipulation of the control flow via API
                    methods of JMeterContext is not working as it used to
                    before 5.0
           Product: JMeter
           Version: 5.3
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: p.mouawad@ubik-ingenierie.com
  Target Milestone: JMETER_5.3.1

As reported in https://github.com/apache/jmeter/pull/606:
----------
Programmatic manipulation of the control flow via API methods of JMeterContext
is not working as it used to.

When JMeter v5.0 introduced the "ability to Switch to next iteration of Current
Loop" (see Bug 62238) the changes to JMeterThread were not entirely logically
equivalent and broke some of our existing test when migrating to v5.x.

The simplest test plan to demonstrate this is as follows, where the Debug
Sampler should never be run.
(This works up to JMeter v4.0 and fails in v5.0 and above.)

Test Plan
    \ Thread Group
        \ JSR223 Sampler
            ctx.setStartNextThreadLoop(true)
        \ Debug Sampler

Reason is the following change (refer here)

When processing the sample result, the "logical action" would only be changed
if the result carried the "restart flag":

if(result.isStartNextThreadLoop()) {                
    threadContext.setStartNextThreadLoop(true); 
}

But now the result unconditionally overwrites the context's "logical action":

threadContext.setTestLogicalAction(result.getTestLogicalAction());

This PR proposes to make the action change conditional again: only if different
than CONTINUE

if (result.getTestLogicalAction() != TestLogicalAction.CONTINUE) {
    threadContext.setTestLogicalAction(result.getTestLogicalAction());
}


----------

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64627] Programmatic manipulation of the control flow via API methods of JMeterContext is not working as it used to before 5.0

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

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

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

--- Comment #1 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
pmouawad pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new c0289a2  Fix for bug fix 62238 (#606)
c0289a2 is described below

commit c0289a2a76082036341e3f8f8602627b4a7fad60
Author: Till Neunast <ti...@users.noreply.github.com>
AuthorDate: Sun Jul 26 08:24:18 2020 +1200

    Fix for bug fix 62238 (#606)
---
 src/core/src/main/java/org/apache/jmeter/threads/JMeterThread.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64627] Programmatic manipulation of the control flow via API methods of JMeterContext is not working as it used to before 5.0

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|5.3                         |5.0
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om

-- 
You are receiving this mail because:
You are the assignee for the bug.