directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Re: [Integration tests] How to speed up the tests
Date Fri, 23 Mar 2007 17:44:25 GMT

On Mar 23, 2007, at 1:09 PM, Emmanuel Lecharny wrote:

> Hi,
> with the new schema handling system (the schema is now stored as  
> Ldap entries in the server, and loaded at startup), the integration  
> tests are taking forever (17 mins on my 3GhZ desktop, 13 minutes on  
> my shinny Imac dual-core).
> The reason is that all the schema elements have to be read out of  
> the server, and as the server is able to manage around 500 req/s  
> (more or less), each test cost around a second, bare minimum.
> As we have around 150 tests in server-unit, this is around 3  
> minutes to run integration tests, and we have the double in core- 
> unit, so it's 6 more minutes.
> We have a few options :
> 1) Improve the server so it can handle 5000 req/s, dividing the  
> tests duration by ten : yeah, that would be cool, but...
> 2) Improve the tests to limit the number of server startup and  
> shutdown to one by test (the setup should contain a test to check  
> if the server has been started or not before, and add code to feed  
> the server and some other code to clean the server)

(2) is a junit TestSetup IIRC?  I might not remember the name but  
there's an easy way to have setUp and tearDown methods called once  
per class or if you code a Suite once per suite.  I think this is  
what you're looking for here.  The setUp and tearDown methods in the  
regular test class still get called once per test.

david jencks

> 3) Write a new tool which will register all the operations to play  
> them in revert order when finishing a test
> 4) any other smart idea, guys ?
> -- 
> Cordialement,
> Emmanuel L├ęcharny

View raw message