Skip to content

Commit

Permalink
Make MurmurHash3Test deterministic
Browse files Browse the repository at this point in the history
  • Loading branch information
leventov committed Jul 18, 2015
1 parent b3e93c2 commit bd2f8a7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/test/java/net/openhft/hashing/MurmurHash3Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ public void testMurmurWithSeed() {

private void testMurmur(LongHashFunction tested, HashFunction referenceFromGuava) {
byte[] testData = new byte[1024];
new Random().nextBytes(testData);
for (int i = 0; i < testData.length; i++) {
testData[i] = (byte) i;
}
for (int i = 0; i < testData.length; i++) {
byte[] data = Arrays.copyOf(testData, i);
LongHashFunctionTest.test(tested, data, referenceFromGuava.hashBytes(data).asLong());
Expand Down

0 comments on commit bd2f8a7

Please sign in to comment.