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 2017/06/19 02:29:31 UTC

[Bug 61198] New: Backend Listener does not work properly in main script when included scripts also contain Backend Listener

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

            Bug ID: 61198
           Summary: Backend Listener does not work properly in main script
                    when included scripts also contain Backend Listener
           Product: JMeter
           Version: 3.2
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: taclayto@us.ibm.com
  Target Milestone: ---

Created attachment 35060
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35060&action=edit
Example JMeter Scripts

***Use Case***
Our testing team makes heavy use of Test Fragments, Include Controllers and
Backend Listeners. 

We have a Thread Group in almost every jmx file that we use for testing while
developing the Test Fragment. This Thread Group contains a Module Controller
and several listeners, one of which is a Backend Listener. 

This Backend Listener in the included jmx file is not a part of the Test
Fragment and is scoped only to the Thread Group.

***Defect Description***
Please reference the attached jmx files:
- toBeIncluded.jmx (defines it's samplers in a Test Fragment, has a Thread
Group that references the Fragment through a Module Controller) 
- includerScript.jmx (includes toBeIncluded.jmx and defines it's own listeners)

When attempting to run our test from the main .jmx file (either in gui or from
cmd line) we see a Null Pointer Exception when the test ends, causing the main
process to never stop. 

This is reproducible by running the attached script "includerScript.jmx"

I attempted to trace this behavior through the code and came across the
constructor in the BackendListener class.
--------------------------------------------------------
/**
* Create a BackendListener.
*/
public BackendListener() {
  synchronized (LOCK) {
    queuesByTestElementName.clear();
  }

  setArguments(new Arguments());
}
--------------------------------------------------------

This constructor is called every time a file is loaded that contains a Backend
Listener. I am not familiar enough with the distributed testing feature in
JMeter to know why this might be necessary, but looking through the rest of the
code, I can't make sense of why this would need to be here.

Commenting out the .clear() command works for the above use case.

***Expected Behavior***
I expect the attached JMeter scripts to work properly. The Backend Listener in
the included .jmx file should not affect the main .jmx file's Backend Listener
just by virtue of being loaded through JMeter's Save Service.

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

[Bug 61198] Backend Listener does not work properly in main script when included scripts also contain Backend Listener

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

--- Comment #2 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Hello,
Thanks for precise report and analysis.

Issue should be fixed in trunk, can you please next nightly build and confirm
issue is fixed in both GUI and NON GUI modes ?

Thanks
Regards

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

[Bug 61198] Backend Listener does not work properly in main script when included scripts also contain Backend Listener

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|PC                          |All
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om
             Status|NEW                         |NEEDINFO

--- Comment #1 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Author: pmouawad
Date: Sat Jul 22 13:52:34 2017
New Revision: 1802695

URL: http://svn.apache.org/viewvc?rev=1802695&view=rev
Log:
Bug 61198 - Backend Listener does not work properly in main script when
included scripts also contain Backend Listener
Bugzilla Id: 61198

Modified:
   
jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/BackendListener.java
    jmeter/trunk/xdocs/changes.xml

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

[Bug 61198] Backend Listener does not work properly in main script when included scripts also contain Backend Listener

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

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

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

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

[Bug 61198] Backend Listener does not work properly in main script when included scripts also contain Backend Listener

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

Emilian Bold <em...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
                 CC|                            |emi@apache.org

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

[Bug 61198] Backend Listener does not work properly in main script when included scripts also contain Backend Listener

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

taclayto@us.ibm.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |VERIFIED

--- Comment #3 from taclayto@us.ibm.com ---
Hi, works for me on JMeter4.0-SNAPSHOT.20180126

Sorry for taking so long to get around to verifying!

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