[ 
https://issues.apache.org/jira/browse/SUREFIRE-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15963182#comment-15963182
 ] 

Tibor Digana commented on SUREFIRE-1314:
----------------------------------------

[~mishail]
{{BeforeClass}} has nothing to do with {{Description.isTest()}}, see the JUnit 
sources.
Such interceptors like before may fail and that's fatal error within JUnit. Ask 
about it the JUnit team and they will tell you that they are not able to 
instantiate test due to static code threw an exception. In general in Java 
Reflection API you would not be able to instantiate a class if static code 
fails.
This must be fatal error. This is maybe edge condition. JUnit should throw 
InitializerError. This behavior could easily change from version to version of 
JUnit library. Ask the JUnit team.

> rerunFailingTestsCount doesn't work for errors in BeforeClass methods
> ---------------------------------------------------------------------
>
>                 Key: SUREFIRE-1314
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1314
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Junit 4.x support
>    Affects Versions: 2.19.1
>            Reporter: Mikhail Stepura
>
> We're using {{surefire.rerunFailingTestsCoun}} property for our integration 
> tests, and everything working fine when an error/failure happens in a test 
> method (i.e. {{@Test}} ), and those test methods are re-executed later, as 
> expected.
> But if an error happens in a {{BeforeClass}} class method, then those test 
> classes are not re-executed. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to