use of org.elasticsearch.cluster.coordination.CoordinationMetadata.VotingConfigExclusion in project crate by crate.
the class GatewayMetaStatePersistedStateTests method createCoordinationMetadata.
private CoordinationMetadata createCoordinationMetadata(long term) {
CoordinationMetadata.Builder builder = CoordinationMetadata.builder();
builder.term(term);
builder.lastAcceptedConfiguration(new CoordinationMetadata.VotingConfiguration(Set.of(generateRandomStringArray(10, 10, false))));
builder.lastCommittedConfiguration(new CoordinationMetadata.VotingConfiguration(Set.of(generateRandomStringArray(10, 10, false))));
for (int i = 0; i < randomIntBetween(0, 5); i++) {
builder.addVotingConfigExclusion(new VotingConfigExclusion(randomAlphaOfLength(10), randomAlphaOfLength(10)));
}
return builder.build();
}
Aggregations