mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user