dcapwell commented on code in PR #3779:
URL: https://github.com/apache/cassandra/pull/3779#discussion_r1942027298


##########
test/distributed/org/apache/cassandra/fuzz/sai/SingleNodeSAITestBase.java:
##########
@@ -104,28 +111,49 @@ public static void afterClass()
     @Before
     public void beforeEach()
     {
-        cluster.schemaChange("DROP KEYSPACE IF EXISTS harry");
-        cluster.schemaChange("CREATE KEYSPACE harry WITH replication = 
{'class': 'SimpleStrategy', 'replication_factor': 1};");
+        cluster.schemaChange("DROP KEYSPACE IF EXISTS " + KEYSPACE);
+        cluster.schemaChange("CREATE KEYSPACE " + KEYSPACE + " WITH 
replication = {'class': 'SimpleStrategy', 'replication_factor': 1};");
     }
 
     @Test
     public void simplifiedSaiTest()
     {
-        withRandom(rng -> basicSaiTest(rng, 
SchemaGenerators.trivialSchema("harry", "simplified", 1000).generate(rng)));
+        withRandom(rng -> saiTest(rng,
+                                  SchemaGenerators.trivialSchema(KEYSPACE, 
"simplified", 1000).generate(rng),
+                                  () -> true,
+                                  DEFAULT_REPAIR_SKIP));
+    }
+
+    @Test
+    public void indexOnlySaiTest()
+    {
+        Generator<SchemaSpec> schemaGen = schemaGenerator(false);
+        withRandom(rng -> saiTest(rng, schemaGen.generate(rng), () -> true, 
DEFAULT_REPAIR_SKIP));
+    }
+
+    @Test
+    public void indexOnlyNoRepairSaiTest()
+    {
+        Generator<SchemaSpec> schemaGen = schemaGenerator(true);
+        withRandom(rng -> saiTest(rng, schemaGen.generate(rng), () -> true, 
Integer.MAX_VALUE));

Review Comment:
   two things i recommend if you want to add more randomness to when you do 
things in the SAI Harry tests; feel free to ignore me...
   
   1) `stateful()` - this lets you define a set of "command"s to run and each 
time the test runs it defines a new distribution for selecting the "command"s, 
so each test case will try different patterns.  
   2) `accord.utils.Gens#oneOf()` - this lets you do the same, but at a `Gen` 
level.  You define a set of things to select from and it will create a 
`Gen<Gen<Thing>>`. 



-- 
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]

Reply via email to