On Sunday, February 15, 2015, sebb <sebbaz@gmail.com> wrote:
> On 14 February 2015 at 17:53, Philippe Mouawad
> <philippe.mouawad@gmail.com <javascript:;>> 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.
>
> Why not just use HTTPSamplerProxy(HTTPSamplerFactory.IMPL_HTTP_CLIENT4);
instead ?
> - 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.
I don't understand what you mean here.
Shouldn't this class be the one under kunit tests instead of ones that are
rarely or not used.
> So I don't think it is a good replacement without further tests to
> check HTTPSamplerProxy actually does what one expects/
I don't understand sebb.
>
> > I also suggest we replace new HttpSampler() by :
> > return new HTTPSamplerProxy(HTTPSamplerFactory.HTTP_SAMPLER_JAVA);
>
> Where is this to be replaced?
>
> > --
> > Regards
> > Philippe
>
--
Cordialement.
Philippe Mouawad.
|