mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
#3 Fixed a number of issue related to bit sets and blocks allocation in VanillaChronicleMap
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user