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: pr-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to