ifesdjeen commented on code in PR #3689:
URL: https://github.com/apache/cassandra/pull/3689#discussion_r1847865206
##########
test/distributed/org/apache/cassandra/distributed/test/accord/AccordHostReplacementTest.java:
##########
@@ -68,25 +65,39 @@ public void hostReplace() throws IOException
fixDistributedSchemas(cluster);
init(cluster);
- qt().withExamples(1).check(rs -> {
- SchemaSpec schema =
HarryHelper.schemaSpecBuilder(HarryHelper.KEYSPACE, "tbl")
-
.transactionalMode(Generators.toHarry(Gens.pick(TRANSACTIONAL_MODES).map(Optional::of)))
- .surjection()
- .inflate(rs.nextLong());
- ReplayingHistoryBuilder harry = new
ReplayingHistoryBuilder(rs.nextLong(), 100, 1, new DefaultDataTracker(), new
InJvmSut(cluster), schema, new TokenPlacementModel.SimpleReplicationFactor(3),
SystemUnderTest.ConsistencyLevel.ALL);
- cluster.schemaChange(format("CREATE KEYSPACE %s WITH
replication = {'class': 'SimpleStrategy', 'replication_factor' : 3};",
HarryHelper.KEYSPACE));
- cluster.schemaChange(schema.compile().cql());
+ withRandom(rng -> {
+ Generator<SchemaSpec> schemaGen =
SchemaGenerators.schemaSpecGen(KEYSPACE, "host_replace", 1000,
+
SchemaSpec.Options.TRANSACTIONAL_MODE,
+
transactionalModeGen.generate(rng).toString());
+ SchemaSpec schema = schemaGen.generate(rng);
+ Generators.TrackingGenerator<Integer> pkGen =
Generators.tracking(Generators.int32(0,
Math.min(schema.valueGenerators.pkPopulation(), 1000)));
+
+ HistoryBuilder history = new
HistoryBuilder(schema.valueGenerators);
Review Comment:
sure! done
--
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]