These test cases were my bone-headed mistake...What they should be doing is testing that prepare() executes properly so I'll fix them once I get a couple of other checkins cleared out.

That said, we really ought to run mvn was assertions on as we need to verify that assertion checking is done properly. For example, there have been times in the past when assertion checking was incorrectly done (i.e. threw errors for legitimate cases) and problems arose when someone ran with -ea.

Jim

On Jul 20, 2006, at 4:57 PM, Raymond Feng wrote:

I'm not sure what happens to the continumm build which underneath runs maven. It seems that assertions are not enabled for the test cases by default and I have to set "-ea" in the "mvn.bat" so that the latest code can be built successfully.

Thanks,
Raymond

----- Original Message ----- From: "Jeremy Boynes" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, July 20, 2006 4:37 PM
Subject: Re: Java assertion related test case failures


On Jul 20, 2006, at 4:14 PM, Raymond Feng wrote:

If the purpose of the test case is to verify the "assert", I suggest that we use "ClassLoader.setClassAssertionStatus (targetClassName, true)" to make sure "assert" is on before the target class is initialized (for example, in a static block or TestCase.setUp()) instead of requesting the whole JVM to be launched with "-ea". Making sense?


I was thinking that when running testcases we want do assertions on across the entire VM so that any problems in peripheral classes would cause the test to fail. As in, all tests should pass if assertions are enabled so let's test that assumption so that we can't mistakenly run the tests with assertions off. IMO it is not a class-by-class thing.

In the maven build assertions are enabled in the surefire plugin so tests should always run with them on.

--
Jeremy


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to