+1On 11/25/10 12:06 PM, Stefan Seelmann wrote:
I'd like to add the junit-addons dependency to server-integ and add
the MultiThreadedMultiInvoker Rule from there to some tests.
The MultiThreadedMultiInvoker (MTMI)  is am implementation of
JUnit's MethodRule. If it is defined in a test class like this
public MultiThreadedMultiInvoker i = new MultiThreadedMultiInvoker();
the invocation of each test method is intercepted by the rule. In case
of the MTMI class the test method (including setups and teardowns) are
invoked multiple times and optionally in multiple threads.
By default, when running the tests with "mvn test" or from within
Eclipse each test method is invoked only once, so there is no
difference to the current situation. But it is possible to control the
number of threads and invocations per thread via system properties:
It helped me to find some issues with unclosed resources in
integration tests, and especially a problem in StartTlsIT test that
caused hanging tests on Windows, so I think it is quite useful.