mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-134 added the following method - bootstapOnlyLocalEntries(boolean bootstapOnlyLocalEntries)
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
|
||||
package net.openhft.chronicle.map;
|
||||
|
||||
import junit.framework.Assert;
|
||||
import net.openhft.chronicle.hash.replication.ReplicationHub;
|
||||
import net.openhft.chronicle.hash.replication.TcpTransportAndNetworkConfig;
|
||||
import org.junit.Before;
|
||||
@@ -26,6 +25,8 @@ import org.junit.Test;
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
import static junit.framework.Assert.assertEquals;
|
||||
|
||||
/**
|
||||
* @author Rob Austin.
|
||||
*/
|
||||
@@ -45,22 +46,19 @@ public class MapByNameTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void testSerializingBuilder() throws TimeoutException, InterruptedException, IOException {
|
||||
{
|
||||
final ChronicleMapBuilder<CharSequence, CharSequence> builder = ChronicleMapBuilder.of(CharSequence.class, CharSequence.class)
|
||||
.minSegments(2)
|
||||
.name("map1")
|
||||
.replication((byte) 1, TcpTransportAndNetworkConfig.of(8244))
|
||||
.removeReturnsNull(true);
|
||||
|
||||
// findMapByName.add(builder);
|
||||
}
|
||||
final ChronicleMapBuilder<CharSequence, CharSequence> builder = ChronicleMapBuilder.of(CharSequence.class, CharSequence.class)
|
||||
.entries(2)
|
||||
.minSegments(2)
|
||||
.name("map1")
|
||||
.replication((byte) 1, TcpTransportAndNetworkConfig.of(8244))
|
||||
.removeReturnsNull(true);
|
||||
|
||||
final ChronicleMap<CharSequence, CharSequence> map = findMapByName.from("map1");
|
||||
final ChronicleMap<CharSequence, CharSequence> map = findMapByName.create(builder);
|
||||
map.put("hello", "world");
|
||||
|
||||
Assert.assertEquals(map.get("hello"), "world");
|
||||
assertEquals(map.get("hello"), "world");
|
||||
}
|
||||
|
||||
// @Test(expected = IllegalArgumentException.class)
|
||||
@@ -102,8 +100,8 @@ public class MapByNameTest {
|
||||
.name("myMap4")
|
||||
.removeReturnsNull(true);
|
||||
|
||||
// ChronicleMap<String, String> map = mapByName.create(builder);
|
||||
// map.put("hello", "world");
|
||||
// ChronicleMap<String, String> map = mapByName.create(builder);
|
||||
// map.put("hello", "world");
|
||||
|
||||
final ChronicleMap<CharSequence, CharSequence> map = mapByName.from("myMap4");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user