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/21 16:34:59 UTC

[GitHub] [ignite-3] sashapolo opened a new pull request #407: IGNITE-15799 Fix WorkDirectoryExtension for test classes with no tests

sashapolo opened a new pull request #407:
URL: https://github.com/apache/ignite-3/pull/407


   https://issues.apache.org/jira/browse/IGNITE-15799


-- 
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



[GitHub] [ignite-3] ibessonov merged pull request #407: IGNITE-15799 Fix WorkDirectoryExtension for test classes with no tests

Posted by GitBox <gi...@apache.org>.
ibessonov merged pull request #407:
URL: https://github.com/apache/ignite-3/pull/407


   


-- 
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



[GitHub] [ignite-3] korlov42 commented on a change in pull request #407: IGNITE-15799 Fix WorkDirectoryExtension for test classes with no tests

Posted by GitBox <gi...@apache.org>.
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



[GitHub] [ignite-3] sashapolo commented on a change in pull request #407: IGNITE-15799 Fix WorkDirectoryExtension for test classes with no tests

Posted by GitBox <gi...@apache.org>.
sashapolo commented on a change in pull request #407:
URL: https://github.com/apache/ignite-3/pull/407#discussion_r734375893



##########
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:
       Indeed!




-- 
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