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

Oleg Ignatenko commented on IGNITE-10762:
-----------------------------------------

(i) Test suites containing fixed set of classes can be easily reworked to 
idiomatic JUnit 4 way with {{@SuiteClasses}} etc. If {{suite()}} method 
contains some initialization code this code should probably be extracted to 
separate method annotated with {{@BeforeClass}}.

For test suites that contain dynamically created sets of test classes the way 
would be somewhat more complicated, options to consider are either extending 
{{Suite}} class ([as shown eg 
here|http://day-today-learning.blogspot.com/2014/08/dynamic-suite-for-junit-test-cases.html])
 or by using {{JUnitCore}} API ([as shown eg 
here|https://www.logicbig.com/tutorials/unit-testing/junit/junit-core.html]).

> migrate test suites from Junit 3 to 4
> -------------------------------------
>
>                 Key: IGNITE-10762
>                 URL: https://issues.apache.org/jira/browse/IGNITE-10762
>             Project: Ignite
>          Issue Type: Sub-task
>            Reporter: Ivan Pavlukhin
>            Priority: Major
>              Labels: MakeTeamcityGreenAgain
>
> It seems that {{@Ignore}} annotation is processed incorrectly when a test in 
> Junit 4 style is included into Junit 3 test suite (wrapped into 
> {{JUnit4TestAdapter}}). Actually such test is skipped silently when it is 
> called during a suite execution. So, for full a blown usage of {{@Ignore}} 
> test suites must be migrated to Junit 4 as well. Expected behavior here is 
> reporting that a particular test method was ignored after tests execution. 
> Ignored tests should be visible in CI.
> Apparently such unexpected behavior of {{@Ignore}} can be caused by 
> {{JUnit4TestAdapter}} as it explicitly filters test method marked with this 
> annotation.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to