[infinispan-dev] FYI: IntelliJ 11 and TestNG

Pete Muir pmuir at redhat.com
Fri Dec 16 06:07:44 EST 2011


This is why you shouldn't use the assert keyword in tests, much better to use the Assert class functions :-)

On 16 Dec 2011, at 10:07, Mircea Markus wrote:

> Thanks for the tip.
> I think we should add a test that check that assertions are enabled so that you get the feedback on this issue instantly?
> 
> On 16 Dec 2011, at 00:40, Manik Surtani wrote:
> 
>> Something fishy with IntelliJ 11 which has had me chasing my tail for a while now - when running TestNG tests from the IDE, the JVM IntelliJ launches does *not* have the -ea flag on (previous versions did!)  This means that assertions that fail *don't* cause a test to fail, giving you false positives.
>> 
>> To fix this, I added -ea to the default set of VM options when running TestNG tests.
>> 
>> Note that running tests via Maven are not affected and in fact this is how I spotted the issue.
>> 
>> Cheers
>> Manik
>> --
>> Manik Surtani
>> manik at jboss.org
>> twitter.com/maniksurtani
>> 
>> Lead, Infinispan
>> http://www.infinispan.org
>> 
>> 
>> 
>> 
>> _______________________________________________
>> infinispan-dev mailing list
>> infinispan-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
> 
> 
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev




More information about the infinispan-dev mailing list