shuwenwei commented on code in PR #17952:
URL: https://github.com/apache/iotdb/pull/17952#discussion_r3426134937


##########
integration-test/src/main/java/org/apache/iotdb/it/env/cluster/env/AIEnv.java:
##########
@@ -19,20 +19,81 @@
 
 package org.apache.iotdb.it.env.cluster.env;
 
+import org.apache.iotdb.it.env.cluster.EnvUtils;
+import org.apache.iotdb.it.env.cluster.node.AINodeWrapper;
+import org.apache.iotdb.it.env.cluster.node.ConfigNodeWrapper;
+import org.apache.iotdb.it.env.cluster.node.DataNodeWrapper;
+import org.apache.iotdb.it.framework.IoTDBTestLogger;
+import org.apache.iotdb.itbase.runtime.ParallelRequestDelegate;
+import org.apache.iotdb.itbase.runtime.RequestDelegate;
+
+import org.slf4j.Logger;
+
+import java.sql.SQLException;
+import java.util.Collections;
+import java.util.List;
+
+import static 
org.apache.iotdb.it.env.cluster.ClusterConstant.NODE_START_TIMEOUT;
+
 public class AIEnv extends AbstractEnv {
+  private static final Logger logger = IoTDBTestLogger.logger;
+
   @Override
   public void initClusterEnvironment() {
     initClusterEnvironment(1, 1);
   }
 
   @Override
   public void initClusterEnvironment(int configNodesNum, int dataNodesNum) {
-    super.initEnvironment(configNodesNum, dataNodesNum, 600, true);
+    super.initEnvironment(configNodesNum, dataNodesNum, 600);
   }
 
   @Override
   public void initClusterEnvironment(
       int configNodesNum, int dataNodesNum, int testWorkingRetryCount) {
-    super.initEnvironment(configNodesNum, dataNodesNum, testWorkingRetryCount, 
true);
+    super.initEnvironment(configNodesNum, dataNodesNum, testWorkingRetryCount);
+  }
+
+  @Override
+  protected void initExtraNodes(
+      final List<ConfigNodeWrapper> configNodeWrappers,
+      final List<DataNodeWrapper> dataNodeWrappers,
+      final String testClassName) {
+    String seedConfigNode = configNodeWrappers.get(0).getIpAndPortString();
+    int dataNodePort = dataNodeWrappers.get(0).getPort();
+    startAINode(seedConfigNode, dataNodePort, testClassName);
+  }
+
+  private void startAINode(

Review Comment:
   Creating a combined Env can work, but I think we should avoid requiring that 
Env to reimplement the AINode startup logic. Could we at least make the AINode 
startup path reusable within the env framework? For example, we could extract 
it into a small helper/initializer, or at minimum make `startAINode` protected 
instead of private. This way a future Env that needs both AINode and StreamNode 
can reuse the existing AINode initialization logic instead of copying it.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to