You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2022/01/31 23:31:09 UTC

[GitHub] [cassandra] maedhroz commented on a change in pull request #1301: Cassandra 17116

maedhroz commented on a change in pull request #1301:
URL: https://github.com/apache/cassandra/pull/1301#discussion_r796152786



##########
File path: test/distributed/org/apache/cassandra/distributed/shared/ClusterUtils.java
##########
@@ -137,6 +137,22 @@ public static void stopUnchecked(IInstance i)
         cluster.stream().forEach(ClusterUtils::stopUnchecked);
     }
 
+    /**
+     * Create a new instance and add it to the cluster, without starting it.
+     *
+     * @param cluster to add to
+     * @param fn function to add to the config before starting
+     * @param <I> instance type
+     * @return the instance added
+     */
+    public static <I extends IInstance> I addInstance(AbstractCluster<I> cluster, Consumer<IInstanceConfig> fn)

Review comment:
       nit: I'd consider removing this and just using the overload that takes an explicit config to copy, given it's only used in `StreamCloseInMiddleTest`. With multiple DCs/racks, a method that arbitrarily adds an instance to the DC/rack of the first instance in the cluster might not be desirable.




-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org