On 14 February 2015 at 17:53, Philippe Mouawad
<[email protected]> wrote:
> Hello,
> Looking at code of class, I see that in fact HTTPSamplerProxy which is used
> by Http Sampler is not tested , instead it appears the class tests :
> - HTTPSampler3 (which is not used anywhere anymore, I propose to delete it,
> I will create a bugzilla for this )
HTTPSampler3 is currently used by test code.
> - HTTPSampler2 (used by SoapSampler)
> - HTTPSampler
>
>
> I suggest we replace code by :
> private HTTPSamplerBase createHttpSampler(int samplerType) {
> switch(samplerType) {
> case HTTP_SAMPLER:
> return new
> HTTPSamplerProxy(HTTPSamplerFactory.HTTP_SAMPLER_JAVA);
> case HTTP_SAMPLER2:
> return new
> HTTPSamplerProxy(HTTPSamplerFactory.IMPL_HTTP_CLIENT3_1);
> case HTTP_SAMPLER3:
> return new
> HTTPSamplerProxy(HTTPSamplerFactory.IMPL_HTTP_CLIENT4);
> default:
> break;
> }
> throw new IllegalArgumentException("Unexpected type: "+samplerType);
> }
>
> If everybody is OK , I will create a bugzilla for this.
That assumes HTTPSamplerProxy is working OK.
So I don't think it is a good replacement without further tests to
check HTTPSamplerProxy actually does what one expects/
> I also suggest we replace new HttpSampler() by :
> return new HTTPSamplerProxy(HTTPSamplerFactory.HTTP_SAMPLER_JAVA);
Where is this to be replaced?
> --
> Regards
> Philippe