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 )
- 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.
I also suggest we replace new HttpSampler() by :
return new HTTPSamplerProxy(HTTPSamplerFactory.HTTP_SAMPLER_JAVA);
--
Regards
Philippe
|