Do we have a bug to enable -ea? Also, do we need to enable it on surefire(gerrit) as well as Ant(regular build tests)
 
Thanks
Sravan
 
From: Manoj Palat <manoj.palat@xxxxxxxxxx> 
Sent: Sunday, September 15, 2019 10:56 AM
To: Eclipse platform release engineering list. <platform-releng-dev@xxxxxxxxxxx>
Cc: General development mailing list of the Eclipse project. <eclipse-dev@xxxxxxxxxxx>; platform-releng-dev-bounces@xxxxxxxxxxx
Subject: [EXTERNAL] Re: [platform-releng-dev] enable assert during tests?
 
Hi Stephan,
+1 for enabling -ea. As mentioned this will help JDT developers to use this more frequently to capture issues early.
Regards,
Manoj
 Stephan Herrmann ---09/14/2019 05:06:41 PM---Hi I happened to realize that JDT tests are executed without the recommended "-ea"
Stephan Herrmann ---09/14/2019 05:06:41 PM---Hi I happened to realize that JDT tests are executed without the recommended "-ea"
From: Stephan Herrmann <stephan.herrmann@xxxxxxxxx>
To: platform-releng-dev@xxxxxxxxxxx, "General development mailing list of the Eclipse project." <eclipse-dev@xxxxxxxxxxx>
Date: 09/14/2019 05:06 PM
Subject: [EXTERNAL] [platform-releng-dev] enable assert during tests?
Sent by: platform-releng-dev-bounces@xxxxxxxxxxx
Hi
I happened to realize that JDT tests are executed without the recommended "-ea" 
switch, both during gerrit tests and during production builds. I also took a few 
samples of other tests and nowhere could I find "-ea".
Shouldn't this be globally enabled for all tests?
Bonus question: can this be set globally without interfering with individual 
test bundles declaring <tycho.surefire.argLine>?
For test launches in the IDE this was fixed via https://bugs.eclipse.org/479553 
so why do those builds behave differently?
Scanning the code I could not find an overwhelming number of assert statements 
in productive code, but if we promise that those will be checked during tests 
maybe we can encourage developers to make more use of this facility (despite how 
it failed to deliver the promised support for design-by-contract ... remember 
the long-time #1 hit in the Java Bug Parade? ...).
That said, in my case I was actually happy that one test run did NOT have "-ea" 
because it detected one of the stupidest mistakes I had made: putting a 
state-changing operation into "assert". Ergo: ideally between gerrit and 
production builds one should *enable* assert, the other should *disable* to get 
maximum coverage.
best,
Stephan
_______________________________________________
platform-releng-dev mailing list
platform-releng-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/platform-releng-dev