HCOLL-369 various fixes

This commit is contained in:
leventov
2015-07-25 23:54:17 +03:00
parent 27275fa5be
commit b88c821ea5
4 changed files with 7 additions and 5 deletions
@@ -56,7 +56,7 @@ public class KeySegmentDistributionTest {
for (int i = 0; i < size; i++) {
random.nextBytes(keyBytes);
String key = new String(keyBytes, StandardCharsets.US_ASCII);
long hash = LongHashFunction.murmur_3().hashBytes(StandardCharsets.UTF_8.encode(key));
long hash = LongHashFunction.city_1_1().hashBytes(StandardCharsets.UTF_8.encode(key));
int segmentIndex = (((int) hash) & Integer.MAX_VALUE) % segments;
// Put the segment index as a value to the map
map.put(key, segmentIndex);
@@ -18,6 +18,7 @@ package net.openhft.chronicle.map;
import net.openhft.chronicle.hash.replication.TcpTransportAndNetworkConfig;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import java.io.IOException;
@@ -29,6 +30,7 @@ import java.util.concurrent.*;
import static net.openhft.chronicle.map.ChronicleMapStatelessClientBuilder.*;
@Ignore
public class StatelessClientDuplicateKeyTest {
@Test
@@ -32,7 +32,7 @@ import static com.samskivert.util.CollectionUtil.selectRandomSubset;
public class Issue24ChronicleSetTest {
public static <H extends ChronicleHash, B extends ChronicleHashBuilder<K, H, B>, K>
public static <K, H extends ChronicleHash<K, ?, ?, ?>, B extends ChronicleHashBuilder<K, H, B>>
H init(B builder, int entrySize, int averageKeySize, String fileName) {
String tmp = System.getProperty("java.io.tmpdir");