dcapwell commented on code in PR #3948:
URL: https://github.com/apache/cassandra/pull/3948#discussion_r1994367347
##########
test/unit/org/apache/cassandra/utils/CassandraGenerators.java:
##########
@@ -413,10 +491,250 @@ public Gen<KeyspaceMetadata> build()
}
}
+ public static Gen<CachingParams> cachingParamsGen()
+ {
+ return rnd -> {
+ boolean cacheKeys = nextBoolean(rnd);
+ int rowsPerPartitionToCache;
+ switch (SourceDSL.integers().between(1, 3).generate(rnd))
+ {
+ case 1: // ALL
+ rowsPerPartitionToCache = Integer.MAX_VALUE;
+ break;
+ case 2: // NONE
+ rowsPerPartitionToCache = 0;
+ break;
+ case 3: // num values
+ rowsPerPartitionToCache =
Math.toIntExact(rnd.next(Constraint.between(1, Integer.MAX_VALUE - 1)));
+ break;
+ default:
+ throw new AssertionError();
+ }
+ return new CachingParams(cacheKeys, rowsPerPartitionToCache);
+ };
+ }
+
+ public enum KnownCompactionAlgo
+ {
+ SizeTiered(SizeTieredCompactionStrategy.class),
+ Leveled(LeveledCompactionStrategy.class),
+ Unified(UnifiedCompactionStrategy.class);
Review Comment:
so thought about this but i felt that the "time" part would make tests
non-deterministic
--
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]