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

Oleg Ignatenko commented on IGNITE-10796:
-----------------------------------------

(i) Some preliminary notes. First, since quite a bit of {{IgniteTestSuite}} 
code looks intended to serve {{IgnoteIgnore}} annotation (at a cursory glance 
it even looks like a primary purpose of IgniteTestSuite to support this 
annotation), I checked it more closely:
{code}
/**
 * Annotation which indicates that the test is ignored.
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.TYPE})
public @interface IgniteIgnore {
    /**
     * Reason for ignore (usually link to JIRA ticket).
     */
    String value();

    /**
     * Whether test should be failed immediately. Useful when test hangs or 
consumes a lot of time.
     */
    boolean forceFailure() default false;
}{code}

As far as I can see in the JUnit 4 it is completely useless because everything 
it does is already covered by {{org.junit.Ignore}} annotation - including also 
the {{forceFailure}} part since JUnit 4 doesn't even let ignored test to start.

Because of that, it should be replaced in tests with junit's Ignore and removed 
from the project. All the code working with it in IgniteTestSuite should be 
totally removed too: since it is JUnit 3 it won't even get to methods annotated 
with Ignore as these are fully removed when JUnit 4 test classes are wrapped in 
adapter, see eg IGNITE-10762.

(As a historical note, it is fairly easy to see that in the context of old 
JUnit 3 this annotation served a useful purpose and was properly designed)     .

Another thing I noticed is some of the constructors in IgniteTestSuite are 
either unused or have too wide access modifier. These should be cleaned up to 
allow for better control when reworking this class.

> Migrate from JUnit 3 to 4 suites involving IgniteTestSuite
> ----------------------------------------------------------
>
>                 Key: IGNITE-10796
>                 URL: https://issues.apache.org/jira/browse/IGNITE-10796
>             Project: Ignite
>          Issue Type: Sub-task
>    Affects Versions: 2.8
>            Reporter: Oleg Ignatenko
>            Assignee: Oleg Ignatenko
>            Priority: Major
>
> This task is to migrate from JUnit 3 to 4 test suites suites involving 
> {{IgniteTestSuite}} API that was introduced per IGNITE-3658.
> If needed, refer parent task comments for more details.



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

Reply via email to