This commit is contained in:
leventov
2014-09-17 18:01:49 +04:00
parent 2bf71da795
commit 2db3194a86
@@ -0,0 +1,34 @@
package net.openhft.chronicle.map;
import org.junit.Test;
import org.testng.Assert;
import java.io.IOException;
import static net.openhft.chronicle.map.Alignment.NO_ALIGNMENT;
import static net.openhft.chronicle.map.Builder.getPersistenceFile;
public class Issue42 {
@Test
public void crashJVMWindowsTest() throws IOException {
final ChronicleMap<CharSequence, CharSequence> map = ChronicleMapBuilder
.of(CharSequence.class, CharSequence.class)
.entryAndValueAlignment(NO_ALIGNMENT)
.entrySize(18)
.entries(15000000)
.minSegments(128)
.create(getPersistenceFile());
for (int i = 0; i < 10000000; ++i) {
String s = String.valueOf(i);
map.put(s, s);
}
for (int i = 0; i < 10000000; ++i) {
String s = String.valueOf(i);
Assert.assertEquals(s, map.get(s));
}
map.close();
}
}