You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "aparna0522 (via GitHub)" <gi...@apache.org> on 2025/12/20 00:13:24 UTC

Re: [PR] [CASSANDRA-21087] Fix non-determinism of repair fuzz tests by passing randomizer to RetryStrategy [cassandra]

aparna0522 commented on code in PR #4537:
URL: https://github.com/apache/cassandra/pull/4537#discussion_r2636621806


##########
test/unit/org/apache/cassandra/service/RetryStrategyTest.java:
##########
@@ -64,6 +69,26 @@ public void fuzzParser()
         });
     }
 
+    @Test
+    public void testSeededWaitRandomizer()
+    {
+        long wait1 = generateSeededWait(100);
+        long wait2 = generateSeededWait(100);
+        Assertions.assertThat(wait1).isEqualTo(wait2);
+
+        long wait3 = generateSeededWait(200);
+        Assertions.assertThat(wait1).isNotEqualTo(wait3);
+    }
+
+    private long generateSeededWait(int seed) {

Review Comment:
   Nit: Small style thing - Cassandra’s style guide usually puts the opening brace on the next line. 
   



-- 
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-unsubscribe@cassandra.apache.org

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


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