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


##########
test/distributed/org/apache/cassandra/fuzz/sai/SingleNodeSAITestBase.java:
##########
@@ -156,20 +187,28 @@ private void basicSaiTest(EntropySource rng, SchemaSpec 
schema)
                                                                                
             .pageSizeSelector(pageSizeSelector(rng))
                                                                                
             .consistencyLevel(consistencyLevelSelector())
                                                                                
             .doubleWriting(schema, hb, cluster, "debug_table"));
-        List<Integer> partitions = new ArrayList<>();
-        for (int j = 0; j < 5; j++)
-        {
-            int picked = globalPkGen.generate(rng);
-            if (usedPartitions.contains(picked))
-                continue;
-            partitions.add(picked);
-        }
+        Set<Integer> partitions = new HashSet<>();
+        while (partitions.size() < NUM_VISITED_PARTITIONS)

Review Comment:
   for me: need to confirm the new tests don't have a possibility of creating a 
schema where the number of possible unique partitions is `< 
NUM_VISITED_PARTITIONS`



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