Search in sources :

Example 1 with ClusterSpec

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);
}
Also used : DataCenterSpec(com.datastax.oss.simulacron.common.cluster.DataCenterSpec) ClusterSpec(com.datastax.oss.simulacron.common.cluster.ClusterSpec)

Aggregations

ClusterSpec (com.datastax.oss.simulacron.common.cluster.ClusterSpec)1 DataCenterSpec (com.datastax.oss.simulacron.common.cluster.DataCenterSpec)1