ID | IEP-30 |
Author | |
Sponsor | |
Created | 21.02.2018 |
Status | |
Motivation
...
- Migrate examples-module.
- Add dependencies to parent/pom.xml
- Change adding suites to IgniteExamplesSelfTestSuite. Pay more attention for this point, because @RunWith(JUnitPlatform.class) construction can provide not fully support of all features .
- Launch IgniteExamplesMLTestSuite separately under JUnit4, because it is impossible to override JUnitPlatform constructor as well as Suite constructor
- Change annotations and imports in test classes
- Ignore commented tests
- Migrate core module in the same way as examples. Classes with dynamic tests do not need to be changed. This is due to the fact that in JUnit5 it is not possible to launch static and dynamic tests under one surefire version.
Positive side: the dynamic tests amount is not so big, they locate in specific places. The all JUnit5 opportunity can not be used in dynamic tests (@TestFactory).
According to the previous points, the next should be added:- Remove test timeouts and add timeouts via annotations
- Replace exception checking according to JUnit5 style
- Replace some tests on parameterized where it is necessary (the same tests are used with different parameters)
- Migrate modules where JUnit tests exist. Check list:
- aop
- aws
- camel
- cassandra
- clients
- cloud
- comatibility
- compress
- direct-io
- flink
- flume
- gce
- geospastial
- hadoop
- hibernate 4.2, 5.1, 5.3, core
- ignored
- indexing
- jcl
- jta
- kafka
- kubernates
- log4j
- log4j2
- ml
- mqtt
- osgi
- rest-htpp
- rocketmql
- schedule
- slf4j
- spark
- spring, spring-data, 2.0
- ssh
- storm
- tensorflow
- twitter
- urldeploy
- web-console
- yarn
- zeromq
- zookeeper
...
The community is informed about the migration to 5 and benefits of the newest version.
Additional improvements
...
in JUnit 3->4 migration.
Remove JUnit3TestLegacyAssertclass. Replace inheritance to imports
...
Actualize JUnit3TestLegacyAssert class: rename it, update documentation. Replacement inheritance to imports is not appropriate here as it leads to changes of all test classes. Moreover, during migration to the next JUnit versions, problem with changing all test classes will arrise again and in new test classes developer should make import manually.
In JUnit3TestLegacySupport:
- Investigate replacement of beforeTest/afterTest and beforeTestsStarted/afterTestsStopped methods and if needed replace them by annotations - it is noticed in IGNITE-11413.
- Replace tearDown, setUp by @BeforeEach, @AfterEach annotations, beforeTest, afterTest methods where it is necessary
- The same situation with beforeTest, afterTest methods
- Replace beforeTestsStarted, afterTestsStopped by @BeforeAll, @AfterAll
The rest methods move to GridAbstractTest- .
- Actualize JUnit3TestLegacySupport: remove deprecated annotation, rename class and specify documentation.
Futhermore, GridAbstractTest and GridCommonAbstractTest refactoring necessity should be investigated. Check ability to turn some instance methods to static methods. It was mentioned in the conversation on dev-list.
Risks and Assumptions
- Additional fails on TC because of migration issues
- Performance degradation of tests execution.
...