Bug 47321 - HTTPSampler2 response timeout not honored
HTTPSampler2 response timeout not honored
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: HTTP
2.3.3
PC Linux
: P2 major (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2009-06-05 12:25 UTC by Ridai Govinda Pombo
Modified: 2009-06-09 18:38 UTC (History)
0 users



Attachments
HTTPSampler2.java modification (338 bytes, patch)
2009-06-08 07:13 UTC, Ridai Govinda Pombo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ridai Govinda Pombo 2009-06-05 12:25:00 UTC
Trying out the new HTTPSampler timeout configurations, I've noticed that the response timeout wasn't being read somehow. It ALWAYS timed out. Connect timeout worked correctly.

At org.apache.jmeter.protocolo.http.sampler.HTTPSampler2.java, line 574:

       int rto = getResponseTimeout();
        if (rto > 0){
            httpMethod.getParams().setSoTimeout(1);
        }

Reading the Java Socket documentation, the setSoTimeout understands miliseconds! I just replaced to:

       int rto = getResponseTimeout();
        if (rto > 0){
            httpMethod.getParams().setSoTimeout(rto);
        }

Recompiled jmeter-2.3.3 and now it works correctly.
Comment 1 Ridai Govinda Pombo 2009-06-08 07:13:21 UTC
Created attachment 23776 [details]
HTTPSampler2.java modification
Comment 2 Sebb 2009-06-09 18:38:37 UTC
Oops! That was temporary test code that should have been replaced.

Thanks for the report; fixed in:

URL: http://svn.apache.org/viewvc?rev=783174&view=rev
Log:
Bug 47321 -  HTTPSampler2 response timeout not honored