You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by bu...@apache.org on 2008/07/30 13:05:28 UTC

DO NOT REPLY [Bug 45502] New: http sampler doesnt refresh filelist

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

           Summary: http sampler doesnt refresh filelist
           Product: JMeter
           Version: 2.3.2
          Platform: Sun
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTTP
        AssignedTo: jmeter-dev@jakarta.apache.org
        ReportedBy: gmournos@yahoo.com


Http Sampler multipart posts the same file all the time.
That is, if the same user wants to submit files f1, f2, f3 ... using the same
http sampler in a loop with a counter, the first file (i.e f1) always gets
submitted.

looking at the code of org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase
method getHTTPFiles caches the filelist it submits. It seems that for this
reason the list of files doesnt get evaluated for every loop, but evaluates
always to {f1}

    public HTTPFileArg[] getHTTPFiles() {
        if (fileList != null){
            return fileList;
        }


-- 
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: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 45502] http sampler doesnt refresh filelist

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





--- Comment #2 from George Mournos <gm...@yahoo.com>  2008-08-01 01:16:46 PST ---
a quick fix is to make fileList null after each sample...This worked for me...


-- 
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: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 45502] http sampler doesnt refresh filelist

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


George Mournos <gm...@yahoo.com> changed:

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




--- Comment #4 from George Mournos <gm...@yahoo.com>  2008-09-23 01:20:59 PST ---
It is a bug.

Indeed variables are used. But the variables get resolved to values only the
first time the sampler is used.
So if the sampler is used in a loop it keeps resending the same files because
the variables dont refresh their values...

A quick fix is to nulify internal variable filelist after method sample. This
way the list of files gets recalculated in the next step of the loop...

I have attached a test case which exactly shows the problem.


-- 
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: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 45502] http sampler doesnt refresh filelist

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


Sebb <se...@apache.org> changed:

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




--- Comment #6 from Sebb <se...@apache.org>  2008-09-23 02:59:08 PST ---
It *is* fixed in the latest SVN - I've just tried the example.

You'll need to download the current nightly (or build from SVN trunk yourself).

BTW, SVN was down for a while - it's back now - which is why the link did not
work.


-- 
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: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 45502] http sampler doesnt refresh filelist

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





--- Comment #5 from George Mournos <gm...@yahoo.com>  2008-09-23 01:22:55 PST ---
Ps: The link you have sent is broken (?????)


-- 
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: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 45502] http sampler doesnt refresh filelist

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





--- Comment #1 from George Mournos <gm...@yahoo.com>  2008-07-31 05:43:06 PST ---
Created an attachment (id=22338)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22338)
sample test case

This test should multipart upload files
C:\Reach_StressTest2\additional\bulk_pre_reg1.xml and 
C:\Reach_StressTest2\additional\bulk_pre_reg2.xml to www.google.com

However, it always submits C:\Reach_StressTest2\additional\bulk_pre_reg1.xml

Form field body:form:dossierFilename reflects the new file (gets correctly
refreshed), but the file is the old one


-- 
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: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 45502] http sampler doesnt refresh filelist

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


Sebb <se...@apache.org> changed:

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




--- Comment #3 from Sebb <se...@apache.org>  2008-09-22 12:49:52 PST ---
I think this was fixed as part of:

URL: http://svn.apache.org/viewvc?rev=697636&view=rev
Log:
HTTPSamplers can now use variables in POSTed file names


If not, please re-open


-- 
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: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org