You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Crampton, Eric" <es...@amazon.com> on 2005/07/05 02:18:18 UTC

[M2] Exceptions during static initialization of a TestCase are eaten

I have a class which is loaded by my TestCase. That class does some static initialization. In the process of moving my Ant-based project to Maven, some <resources> weren't set properly which caused that static initialization to fail. Unfortunately, m2 eats that exception and just shows zero tests as having run:

Results :
[surefire] Tests run: 0, Failures: 0, Errors: 0

Enabling -X and -e doesn't help and nothing is written in target/surefire-reports. This problem is easy to reproduce: just throw an unchecked exception from within the static block of a class which extends TestCase.

Am I correct in hoping that m2 will give me the offending stack trace?

Thanks!
--Eric

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [M2] Exceptions during static initialization of a TestCase are eaten

Posted by Emmanuel Venisse <em...@venisse.net>.
This problem is fixed in svn.

Emmanuel


Crampton, Eric wrote:
> I have a class which is loaded by my TestCase. That class does some static initialization. In the process of moving my Ant-based project to Maven, some <resources> weren't set properly which caused that static initialization to fail. Unfortunately, m2 eats that exception and just shows zero tests as having run:
> 
> Results :
> [surefire] Tests run: 0, Failures: 0, Errors: 0
> 
> Enabling -X and -e doesn't help and nothing is written in target/surefire-reports. This problem is easy to reproduce: just throw an unchecked exception from within the static block of a class which extends TestCase.
> 
> Am I correct in hoping that m2 will give me the offending stack trace?
> 
> Thanks!
> --Eric
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org