You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/10/22 08:05:54 UTC
[GitHub] [ignite-3] korlov42 commented on a change in pull request #407: IGNITE-15799 Fix WorkDirectoryExtension for test classes with no tests
korlov42 commented on a change in pull request #407:
URL: https://github.com/apache/ignite-3/pull/407#discussion_r734323178
##########
File path: modules/runner/src/integrationTest/java/org/apache/ignite/internal/calcite/AbstractBasicIntegrationTest.java
##########
@@ -101,39 +100,28 @@
/** Work directory */
@WorkDirectory
- private Path workDir;
-
- @BeforeEach
- protected void bootstrap() {
- if (!CLUSTER_NODES.isEmpty())
- return;
+ private static Path WORK_DIR;
+ /** */
+ @BeforeAll
+ static void startNodes() {
NODES_BOOTSTRAP_CFG.forEach((nodeName, configStr) ->
- CLUSTER_NODES.add(IgnitionManager.start(nodeName, configStr, workDir.resolve(nodeName)))
+ CLUSTER_NODES.add(IgnitionManager.start(nodeName, configStr, WORK_DIR.resolve(nodeName)))
);
-
- initTestData();
}
/** */
@AfterAll
- static void tearDown() throws Exception {
- if (CLUSTER_NODES.isEmpty())
- return;
-
- if (LOG.isInfoEnabled())
- LOG.info("Start tearDown()");
+ static void stopNodes() throws Exception {
+ LOG.info("Start tearDown()");
IgniteUtils.closeAll(ITUtils.reverse(CLUSTER_NODES));
- CLUSTER_NODES.clear();
Review comment:
CLUSTER NODE is a static field, so you must clear it at the end, otherwise the next test class will interact with the stopped node.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org