The way I read your explanation, I am not entirely convinced anything is
being run in parallel; look for the "maven-surefire-plugin" in your pom
and see if the "parallel" setting is active.

Much more likely you have static state in your tests that fails when
multiple test methods are being run in the same vm invocation. If you
try to run ALL the tests within the class at once from eclipse I bet
they will fail. In this case you simply need to reset the static state
between each test.


Kristian

state, and does not 
lø., 20.11.2010 kl. 18.22 +0100, skrev Iron Eagle:
> Hi,
> 
> I have a problem with the junit (3.8.1) tests in a mvane project. While each 
> unit test is successfull when I start it within eclipse, maven fails, when 
> executing the tests.
> 
> I figured out, that the test methods of my junit test are executed parallel. 
> This is bad, since the class under test is singleton. So in every test 
> method, the same instance is used. This has side effects in each test method, 
> what leads into a failure.
> 
> Is this a known problem? is there a simple way to force s sequential 
> execution of the unit tests? (I use junit 3.8.1, so I can not use anotations 
> like @Depends)
> 
> best regards
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to