directory-kerby mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <elecha...@gmail.com>
Subject Re: Kerby benchmark issue related to ApacheDS
Date Mon, 20 Jul 2015 05:02:07 GMT
Le 20/07/15 05:58, Zheng, Kai a écrit :
> Hi Emmanuel or all,
>
> I'm working on Kerby benchmark and just converted existing benchmark tests to use JMH
micro benchmark framework. A test related to ApacheDS failed as below and I'm wondering if
there're some concurrency issue in the codes. Would you take a look at it if you're convenient?
Thanks.

There is a mistake in your test.

When you do :

        ApReqContainer apreqContainer = new
ApReqContainer(apreqToken.duplicate());

you inject a different stream in the container than teh one you will
decode. When the codec will try to decode the inner ticket, it will use
this duplicated stream, which will start at position 0, as the stream is
duplicated, when it's expected to be at position 25, as the original
stream has already been partially decoded.

What you should do is :

        ApReqContainer apreqContainer = new ApReqContainer(apreqToken);

Now, be sure to do a apreqToken.flip(); at the end of your test,
otherwise you won't be able to run it more than once


Mime
View raw message