Avoid loops in tests
--------------------

                 Key: DIRMINA-295
                 URL: http://issues.apache.org/jira/browse/DIRMINA-295
             Project: Directory MINA
          Issue Type: Wish
            Reporter: Emmanuel Lecharny
            Priority: Minor


It would be very cool to avoid including code like that :

    public void testEventOrder() throws Throwable
    {
        ...
        final int loop = 1000000;
        final int end = sessions.length - 1;
        final ExecutorFilter filter = this.filter;
        ( ( ThreadPoolExecutor ) filter.getExecutor() ).setKeepAliveTime( 3, 
TimeUnit.SECONDS );
        
        for( int i = 0; i < loop ; i++ )
        {
            Integer objI = new Integer( i );
    ...

in tests. This kind of test slow down the project building. Maven is slow 
enough that we don't add our own sluggishness :)

We have tried to use specific configuration in maven, which are launch with a 
-Dperformance flag to run such tests, if the test has a special name like 
**PerfTest (look at -Dintegration for apache directory server), and it's very 
helpfull.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to