Bug 47321 - HTTPSampler2 response timeout not honored
Summary: HTTPSampler2 response timeout not honored
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.3.3
Hardware: PC Linux
: P2 major (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
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
Comment 3 The ASF infrastructure team 2022-09-24 20:37:43 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2245