#3 Fixed a number of issue related to bit sets and blocks allocation in VanillaChronicleMap

This commit is contained in:
leventov
2014-10-15 11:11:06 +04:00
parent 0d7704435b
commit 331bdf8328
2 changed files with 50 additions and 8 deletions
@@ -0,0 +1,28 @@
package net.openhft.chronicle.map;
import net.openhft.chronicle.set.ChronicleSet;
import net.openhft.chronicle.set.ChronicleSetBuilder;
import org.junit.Test;
import java.io.IOException;
import java.util.Random;
import java.util.Set;
public class Issue3 {
@Test
public void test() throws IOException {
Set<Long> set = ChronicleSetBuilder.of(Long.class)
.actualSegments(1)
.actualEntriesPerSegment(1000)
.create();
Random r = new Random();
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 300; j++) {
set.add(r.nextLong());
}
set.clear();
}
}
}