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