Bug 47321

Summary: HTTPSampler2 response timeout not honored
Product: JMeter - Now in Github Reporter: Ridai Govinda Pombo <ridai.govinda>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: major    
Priority: P2    
Version: 2.3.3   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Attachments: HTTPSampler2.java modification

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