oertl commented on code in PR #20359:
URL: https://github.com/apache/kafka/pull/20359#discussion_r2462786054


##########
clients/src/test/java/org/apache/kafka/common/utils/UtilsTest.java:
##########
@@ -117,6 +118,35 @@ public void testMurmur2() {
         }
     }
 
+    private static String toHexString(byte[] buf) {
+        StringBuilder bld = new StringBuilder();
+        for (byte b : buf) {
+            bld.append(String.format("%02x", b));
+        }
+        return bld.toString();
+    }
+
+    @Test
+    public void testMurmur2Checksum() {
+        // calculates the checksum of hashes of many different random byte 
arrays of variable length
+        // this test detects any incompatible changes to the Murmur2 
implementation with near certainty
+        int numTrials = 100;
+        int maxLen = 1000;
+        SplittableRandom random = new SplittableRandom(0xbd4458b165652255L);

Review Comment:
   @mimaison, to address your concern, I have changed the seed to 0 in ba1c933.



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

Reply via email to