use of com.datastax.oss.simulacron.common.cluster.ClusterSpec in project java-driver by datastax.
the class ProtocolVersionMixedClusterIT method mixedVersions.
private BoundCluster mixedVersions(String... versions) {
ClusterSpec clusterSpec = ClusterSpec.builder().withCassandraVersion(versions[0]).build();
DataCenterSpec dc0 = clusterSpec.addDataCenter().build();
// inherits versions[0]
dc0.addNode().build();
for (int i = 1; i < versions.length; i++) {
dc0.addNode().withCassandraVersion(versions[i]).build();
}
return SimulacronRule.server.register(clusterSpec);
}
Aggregations