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

Vadim Pakhnushev edited comment on IGNITE-18947 at 4/14/23 12:55 PM:
---------------------------------------------------------------------

I wonder if it would make sense to move all {{@WorkDirectory Path workDir}} 
from subclasses to the base {{IgniteIntegrationTest}} where the 
{{WorkDirectoryExtension}} is registered.


was (Author: JIRAUSER289102):
I wonder if it would make sense to move all {{@WorkDirectory Path workDir}} to 
the base {{IgniteIntegrationTest}} where the {{WorkDirectoryExtension}} is 
registered.

> Unify integration tests in runner module
> ----------------------------------------
>
>                 Key: IGNITE-18947
>                 URL: https://issues.apache.org/jira/browse/IGNITE-18947
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Roman Puchkovskiy
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.0.0-beta2
>
>
> We want to make sure that all Ignite instances started by a test get stopped 
> after the test stuite stops, regardless of the tests outcome.
> IGNITE-18874 introduces a JUnit extension that performs such a cleanup. We 
> want to make sure that any integration test (running Ignite instances) in the 
> runner module gets executed with this extension. The current approach of 
> IGNITE-18874 is to make this extension register automatically, but such an 
> automatic registration brings a problem: WorkDirectoryExtension's 
> after/after-all methods remove directories before the cleanup extension stops 
> Ignite instances, which is weird.
> The best thing would be to make sure that we always register this extension 
> explicitly (declaratively) for each test that needs it.
> It is suggested to add one (or a couple) of base classes registering the 
> extension, so that each integration test class in the runner module extends 
> one of them.
>  # IGNITE-18874 already introduces {{TestStartingIgnites}} that is used as a 
> base of most of the mentioned tests
>  # We should migrate tests extending {{IgniteAbstractTest}} to the same 
> approach (make {{IgniteAbstractTest}} one of the base classes mentioned 
> above, or make it extend one of these classes, or...)
>  # Make sure that every single test class that can start ignites in the 
> runner module extends one of the mentioned base classes
>  # Make sure that build fails if there is such non-complying test classes 
> (not clear yet how do achieve this)
>  # Maybe it makes sense to unify how we write test classes in the runner 
> module. Currently, there seems to be 2 approaches: in one, a shared cluster 
> is started for all tests; in another, a cluster is started per test. Both 
> approaches have pros and cons. Maybe we should leave both of them (in 
> IGNITE-18874, the corresponding base classes are renamed to reflect this 
> shared/per-test distinction).
> We should also probably think whether we should leave the automatic 
> registration of the cleanup extension after the measures described in this 
> issue. Probably we should, just in case.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to