I see this type of behavior when there is a dependency, side effect,
between tests.
An example of this is STATIC variables and I have seen this same type of
effect many times when running JUnits with IntelliJ v.s maven
IntelliJ reinstates the JUnit Runner class for each test method, and
therefore starts with a clean slate for static variables.
I believe starting with IJ 4.5, to implement the rerun failed test, IJ
changed the behavior to differ from just using maven.
I find this difference in running JUnits valuable since they find latent
bugs in the JUnit tests, but they can have funny consequences:
<Funny story>
I had a case where a co-worker kept breaking the JUnits because he was
using eclipse and was FIXING the expected results of the tests to pass
when run under eclipse.
However, doing this would break the tests running under IntelliJ, I
would FIX the tests running under IntelliJ, which would break the tests
running under eclipse.
This continued for several weeks, and we both kept FIXING the tests.
Finally I realized what was going on and fixed the static initialization
problem and the problem
went away.
<Funny Story>
Hope this helps
-Rob
On 8/26/2009 10:30 AM, Lukasz Lenart wrote:
Hi,
I discovered another strange thing. When I just launch the test from
IDEA with -Duser.country=US -Duser.language=en, then it pass. But when
I use maven with the same settings, only two test fail :P
testSimple(org.apache.struts2.dojo.views.jsp.ui.DateTimePickerTagTest)
testSimpleDisabled(org.apache.struts2.dojo.views.jsp.ui.DateTimePickerTagTest)
I've tried to use the latest maven version, JDK5 and JDK6, but no
lock. Any ideas?
Regards
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]