ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Pavlukhin (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (IGNITE-11413) Remove beforeTestsStarted, afterTestsStarted from JUnit3TestLegacySupport
Date Tue, 02 Apr 2019 13:47:01 GMT

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

Ivan Pavlukhin edited comment on IGNITE-11413 at 4/2/19 1:46 PM:
-----------------------------------------------------------------

[~ivanan.fed], indeed you are right. By some reason I thought of a code (schematically) like
below. But effectively current code does the same.
{code}
    @Rule public transient TestRule runRule = (base, desc) -> new Statement() {
        @Override public void evaluate() throws Throwable {
            assert getName() != null : "getName returned null";

            setUp();

            try {
                runTest(base);
            }
            finally {
                tearDown();
            }
        }
    };
{code}


was (Author: pavlukhin):
[~ivanan.fed], indeed you are right. By some reason I thought of a code (schematically) like
below. But effectively current code does the same.
```
    @Rule public transient TestRule runRule = (base, desc) -> new Statement() {
        @Override public void evaluate() throws Throwable {
            assert getName() != null : "getName returned null";

            setUp();

            try {
                runTest(base);
            }
            finally {
                tearDown();
            }
        }
    };
```

> Remove beforeTestsStarted, afterTestsStarted from JUnit3TestLegacySupport
> -------------------------------------------------------------------------
>
>                 Key: IGNITE-11413
>                 URL: https://issues.apache.org/jira/browse/IGNITE-11413
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Ivan Fedotov
>            Assignee: Ivan Fedotov
>            Priority: Major
>              Labels: iep-30
>
> beforeTestsStarted and afterTestsStarted methods are deprecated in context of JUnit4 functional.
The 4th version provides @BeforeClass, @AfterClass annotations for such purposes. Methods must
be moved in corresponded classes and marked by annotations.
> It could require changes in start/stop nodes process because methods under  @BeforeClass,
@AfterClass annotations must be static.



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

Mime
View raw message