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/01/09 15:52:13 UTC

[Bug 60563] New: 2x CSV Dataset with same filename concurrently pick lines

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

            Bug ID: 60563
           Summary: 2x CSV Dataset with same filename concurrently pick
                    lines
           Product: JMeter
           Version: 3.1
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: loisel.jerome@gmail.com
  Target Milestone: ---

1 - When creating several csv variables using the same file an unexpected
behavior happens.
Let's consider two variables named login1 and login2 using the same file
(sharing mode on "all threads").
During the first iteration login1 will use the first line of the file and
login2 will use the second line of the file. As if they were two different
threads requesting values from this file.

2 - If I setup the same variables with two identical files named differently
both variables will use the first line of the csv.

The 2nd behavior seems normal while the 1st one seems like a bug. 2x CSV
Datasets are concurrently reading the same file when filename is the same since
only a single Reader is shared between them.

When looking at the code, it seems like the filename is used a key for a
caching system which keeps the BufferedReader. (FileServer.getReader)

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

[Bug 60563] 2x CSV Dataset with same filename concurrently pick lines

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

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

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

--- Comment #4 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Hello Jérôme,
This is the desired behaviour.
In your case, if you want to do what you describe, just set SharingMode to a
different value for each CSV DataSet.

If we change the existing behaviour, it can break a lot of existing test plans.
In my particular case for example, I rely on such behaviour.

Feel free to reopen if you disagree and have an idea to have a better
behaviour.
Regards

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

[Bug 60563] 2x CSV Dataset with same filename concurrently pick lines

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

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

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

--- Comment #1 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Hello Jérôme,
Can you provide a Test plan showing the problem ?

I am a bit tired and don't understand the description :-)

Thanks

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

[Bug 60563] 2x CSV Dataset with same filename concurrently pick lines

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

--- Comment #3 from Jerome <lo...@gmail.com> ---
Created attachment 34611
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34611&action=edit
jmx to reproduce

Check JMeter logs. It should display first=1, and second=1.

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

[Bug 60563] 2x CSV Dataset with same filename concurrently pick lines

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

--- Comment #2 from Jerome <lo...@gmail.com> ---
Sure, i'll do. The issue is simple:

1. Setup 2 CSV Dataset pointing to the same file,
2. Use both variables one time in the script.

Expected: first value of the file for each separate variable.
Actual: first value and second value seen.

When looking at the code, it seems obvious since the filename is used as key
for a caching system. I'm attaching the JMX.

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