You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by Philippe Mouawad <ph...@gmail.com> on 2015/01/23 00:42:36 UTC

httpclient.timeout in jmeter.properties

Hi,
Looking at this property I noticed it was in fact only used by HttpClient3
while documentation does not mention this.

So:
- Is this a bug ? Should it also apply to HttpClient 4 ?
- Is this a feature ? In this case this should be documented in
jmeter.properties

Regards
Philippe

Re: httpclient.timeout in jmeter.properties

Posted by sebb <se...@gmail.com>.
On 23 January 2015 at 20:16, Philippe Mouawad
<ph...@gmail.com> wrote:
> On Fri, Jan 23, 2015 at 1:03 AM, sebb <se...@gmail.com> wrote:
>
>> On 22 January 2015 at 23:42, Philippe Mouawad
>> <ph...@gmail.com> wrote:
>> > Hi,
>> > Looking at this property I noticed it was in fact only used by
>> HttpClient3
>> > while documentation does not mention this.
>> >
>> > So:
>> > - Is this a bug ? Should it also apply to HttpClient 4 ?
>>
>> Where is it used?
>>
>
> 1/ In AjpSampler#setupConnection to set a timeout on Socket
> 2/ In HTTPHCAbstractImpl#SO_TIMEOUT as a Constant which is only used in
> HTTPHC3Impl static init block
>         if (SO_TIMEOUT >= 0){
>             params.setIntParameter(HttpMethodParams.SO_TIMEOUT, SO_TIMEOUT);
>         }
> where params is
> org.apache.commons.httpclient.params.DefaultHttpParams.getDefaultParams();
>
> As this can be done in hc.parameters and httpclient.parameters it seems
> redundant for HC3 and its name confusing as you can think it configured
> read timeout for all HttpClientX but it does not.
> So I suggest to:
> - rename it to ajpsampler.timeout
> Not use it anymore in HTTPHCAbstractImpl nor HTTPHC3Impl

No, because that may break existing user tests.

If a property is used anywhere, it cannot just be renamed/deleted.

If it still has some use - and there is no alternative to using it -
we should document it accurately.
If the function it provides has been superseded by other documented
methods, then it would be OK to drop the commented reference in
jmeter.properties.
But we cannot just drop the feature.

In this case it appears to be the only way of configuring the timeout
in AJP sampler.
So the documentation in jmeter.properties needs to be corrected.

>
>> What does it do?
>>
> Explained above
>
>> Does it do anything in HC3 that is not otherwise possible to do in HC4 or
>> HTTP?
>>
> Yes for AjpSampler , not for  HTTPHC3Impl
>
>
>> Does the jmeter.properties history give any clues?
>>
>
> It says this:
> # Following properties apply to both Commons and Apache HttpClient <= Looks
> wrong unless I missed something
>
> # set the socket timeout (or use the parameter http.socket.timeout)
> # Value is in milliseconds
> #httpclient.timeout=0
> # 0 == no timeout
>
>
>
>
>> I've not checked, but the usual reason for adding a property is to
>> enable support for something without needing to update the GUI or the
>> JMX.
>> If the feature proves useful, then the GUI may well later be updated,
>> rendering the property unnecessary.
>>
>> > - Is this a feature ? In this case this should be documented in
>> > jmeter.properties
>>
>> If it provides a feature that is otherwise unavailable it should be
>> documented.
>> Otherwise the entry should perhaps be removed from the properties file
>> to discourage its use.
>>
>> > Regards
>> > Philippe
>>
>
>
>
> --
> Cordialement.
> Philippe Mouawad.

Re: httpclient.timeout in jmeter.properties

Posted by Philippe Mouawad <ph...@gmail.com>.
On Fri, Jan 23, 2015 at 1:03 AM, sebb <se...@gmail.com> wrote:

> On 22 January 2015 at 23:42, Philippe Mouawad
> <ph...@gmail.com> wrote:
> > Hi,
> > Looking at this property I noticed it was in fact only used by
> HttpClient3
> > while documentation does not mention this.
> >
> > So:
> > - Is this a bug ? Should it also apply to HttpClient 4 ?
>
> Where is it used?
>

1/ In AjpSampler#setupConnection to set a timeout on Socket
2/ In HTTPHCAbstractImpl#SO_TIMEOUT as a Constant which is only used in
HTTPHC3Impl static init block
        if (SO_TIMEOUT >= 0){
            params.setIntParameter(HttpMethodParams.SO_TIMEOUT, SO_TIMEOUT);
        }
where params is
org.apache.commons.httpclient.params.DefaultHttpParams.getDefaultParams();

As this can be done in hc.parameters and httpclient.parameters it seems
redundant for HC3 and its name confusing as you can think it configured
read timeout for all HttpClientX but it does not.
So I suggest to:
- rename it to ajpsampler.timeout
Not use it anymore in HTTPHCAbstractImpl nor HTTPHC3Impl


> What does it do?
>
Explained above

> Does it do anything in HC3 that is not otherwise possible to do in HC4 or
> HTTP?
>
Yes for AjpSampler , not for  HTTPHC3Impl


> Does the jmeter.properties history give any clues?
>

It says this:
# Following properties apply to both Commons and Apache HttpClient <= Looks
wrong unless I missed something

# set the socket timeout (or use the parameter http.socket.timeout)
# Value is in milliseconds
#httpclient.timeout=0
# 0 == no timeout




> I've not checked, but the usual reason for adding a property is to
> enable support for something without needing to update the GUI or the
> JMX.
> If the feature proves useful, then the GUI may well later be updated,
> rendering the property unnecessary.
>
> > - Is this a feature ? In this case this should be documented in
> > jmeter.properties
>
> If it provides a feature that is otherwise unavailable it should be
> documented.
> Otherwise the entry should perhaps be removed from the properties file
> to discourage its use.
>
> > Regards
> > Philippe
>



-- 
Cordialement.
Philippe Mouawad.

Re: httpclient.timeout in jmeter.properties

Posted by sebb <se...@gmail.com>.
On 22 January 2015 at 23:42, Philippe Mouawad
<ph...@gmail.com> wrote:
> Hi,
> Looking at this property I noticed it was in fact only used by HttpClient3
> while documentation does not mention this.
>
> So:
> - Is this a bug ? Should it also apply to HttpClient 4 ?

Where is it used?
What does it do?
Does it do anything in HC3 that is not otherwise possible to do in HC4 or HTTP?

Does the jmeter.properties history give any clues?
I've not checked, but the usual reason for adding a property is to
enable support for something without needing to update the GUI or the
JMX.
If the feature proves useful, then the GUI may well later be updated,
rendering the property unnecessary.

> - Is this a feature ? In this case this should be documented in
> jmeter.properties

If it provides a feature that is otherwise unavailable it should be documented.
Otherwise the entry should perhaps be removed from the properties file
to discourage its use.

> Regards
> Philippe