[jexl] Test failing with JUnit 4.11

2013-05-31 Thread Emmanuel Bourg
Hi, I observed a test failure using JUnit 4.11 with the JEXL 2.x tests: Tests in error: testCalculations(org.apache.commons.jexl2.ArithmeticTest): org.apache.commons.jexl2.junit.Asserter.assertExpression@95![0,5]: '3 / 0;' divide error This doesn't happen with JUnit 4.10. JEXL 3 doesn't seem

Re: [jexl] Test failing with JUnit 4.11

2013-05-31 Thread Emmanuel Bourg
Le 31/05/2013 16:12, Gary Gregory a écrit : One thing to watch out for is that test method execution order is 'random'. Even the test methods for a given class? Emmanuel Bourg - To unsubscribe, e-mail:

Re: [jexl] Test failing with JUnit 4.11

2013-05-31 Thread Gary Gregory
Yes, please see https://garygregory.wordpress.com/2013/01/23/understanding-junit-method-order-execution-updated-for-version-4-11/ Gary On Fri, May 31, 2013 at 10:30 AM, Emmanuel Bourg ebo...@apache.org wrote: Le 31/05/2013 16:12, Gary Gregory a écrit : One thing to watch out for is that

Re: [jexl] Test failing with JUnit 4.11

2013-05-31 Thread Jörg Schaible
Gary Gregory wrote: Yes, please see https://garygregory.wordpress.com/2013/01/23/understanding-junit-method-order-execution-updated-for-version-4-11/ ... and ... http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#runOrder Personally I use always random order in my tests.

Re: [jexl] Test failing with JUnit 4.11

2013-05-31 Thread sebb
Looks like the problem might be the engine settings; divide by 0 will throw an error in strict mode (lenient=false) So if tests use a mix of modes, it's possible that the wrong mode will be left around. The JEXL engine is not immutable, and is shared between some tests, so this can easily

Re: [jexl] Test failing with JUnit 4.11

2013-05-31 Thread Emmanuel Bourg
Le 31/05/2013 19:14, sebb a écrit : Looks like the problem might be the engine settings; divide by 0 will throw an error in strict mode (lenient=false) That's the missing piece of the puzzle. testDivideByZero is declared after testCalculations but is executed before with JUnit 4.11.