janhoy commented on code in PR #2391:
URL: https://github.com/apache/solr/pull/2391#discussion_r2435545434


##########
solr/test-framework/src/java/org/apache/solr/cloud/MiniSolrCloudCluster.java:
##########
@@ -342,6 +344,185 @@ public MiniSolrCloudCluster(
     }
   }
 
+  /**
+   * Create a MiniSolrCloudCluster with embedded ZooKeeper quorum mode. Each 
Solr node runs its own
+   * embedded ZooKeeper server, and together they form a quorum.
+   *
+   * @param numServers number of Solr servers (must be at least 3 for quorum)
+   * @param baseDir base directory that the mini cluster should be run from
+   * @param solrXml solr.xml file content
+   * @param jettyConfig Jetty configuration
+   * @param securityJson Optional security.json configuration
+   * @param trackJettyMetrics whether to track Jetty metrics
+   * @throws Exception if there was an error starting the cluster
+   */
+  MiniSolrCloudCluster(
+      int numServers,
+      Path baseDir,
+      String solrXml,
+      JettyConfig jettyConfig,
+      Optional<String> securityJson,
+      boolean trackJettyMetrics,
+      boolean useEmbeddedZkQuorum)
+      throws Exception {
+
+    if (!useEmbeddedZkQuorum) {
+      throw new IllegalArgumentException("This constructor is only for 
embedded ZK quorum mode");
+    }
+    if (numServers < 3) {
+      throw new IllegalArgumentException(
+          "ZooKeeper quorum requires at least 3 nodes, got: " + numServers);
+    }
+
+    Objects.requireNonNull(securityJson);
+    this.baseDir = Objects.requireNonNull(baseDir);
+    this.jettyConfig = Objects.requireNonNull(jettyConfig);
+    this.solrXml = solrXml == null ? DEFAULT_CLOUD_SOLR_XML : solrXml;
+    this.trackJettyMetrics = trackJettyMetrics;
+    this.externalZkServer = true; // No ZkTestServer in quorum mode

Review Comment:
   Yea, what is even an "external" zk in the context of our test framework?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to