directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <elecha...@gmail.com>
Subject Re: Weird behavior in Server-integ tests
Date Fri, 02 Aug 2013 08:02:11 GMT
Le 8/2/13 9:20 AM, Emmanuel Lécharny a écrit :
> Hi guys,
>
> there is something that is extremelly weird i server-integ test : we
> have some kind of 1 second delay for each test we run. For instance,
> when we run the SearchIT tests, any test is taking 1 second at least to
> execute.
>
> This should not be the case, because we don't inject a lot of entries.
>
> I suspect that MINA is the culprit here : the select() loop is waiting 1
> second before acting.
>
> This slows down the tests a lot, as we have around 600 of them.
>
> To be investigated...
>
After investigation, I found that the following line :

public class SearchIT extends AbstractLdapTestUnit
{
    @Rule
    public MultiThreadedMultiInvoker i = new MultiThreadedMultiInvoker(
MultiThreadedMultiInvoker.NOT_THREADSAFE );

cause the delay.

With this line, the SearchIT test runs in rouglhy 49 seconds, withhout
it, it runs in 13 seconds !

The reason is that the MultiThreadMultiInvoker introduce a 1 second sleep :

                while(counter.get() > 0)
                {
                    Thread.sleep( 1000 );
                }
(line 187).

We shoumd probably get rid of this @rules, unless we have very good
reason to use it...




-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 


Mime
View raw message