directory-kerby mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zheng, Kai" <>
Subject RE: Kerby benchmark issue related to ApacheDS
Date Mon, 20 Jul 2015 05:11:17 GMT
Ah, right. I didn't notice the token to be decoded should be passed TWO times (though not very
natural to me). Thanks Emmanule!

        ApReqContainer apreqContainer = new ApReqContainer(apreqToken.duplicate());
        krbDecoder.decode(apreqToken, apreqContainer);


-----Original Message-----
From: Emmanuel Lécharny [] 
Sent: Monday, July 20, 2015 1:02 PM
Subject: Re: Kerby benchmark issue related to ApacheDS

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?

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

View raw message