mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-230 - created nextEntry()
This commit is contained in:
@@ -32,7 +32,7 @@ import java.util.concurrent.TimeUnit;
|
||||
*/
|
||||
public class Builder {
|
||||
|
||||
public static final int SIZE = 10000;
|
||||
public static final int SIZE = 1000;
|
||||
// added to ensure uniqueness
|
||||
static int count;
|
||||
static String WIN_OS = "WINDOWS";
|
||||
|
||||
@@ -5,7 +5,10 @@ import net.openhft.lang.io.ByteBufferBytes;
|
||||
import net.openhft.lang.model.Byteable;
|
||||
import net.openhft.lang.model.DataValueClasses;
|
||||
import net.openhft.lang.values.IntValue;
|
||||
import org.junit.*;
|
||||
import org.junit.After;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.io.IOException;
|
||||
@@ -100,19 +103,19 @@ public class TcpReplicationSoakTest {
|
||||
final int select = rnd.nextInt(2);
|
||||
final ChronicleMap<Integer, CharSequence> map = select > 0 ? map1 : map2;
|
||||
|
||||
if (rnd.nextBoolean()) {
|
||||
map.put(rnd.nextInt(Builder.SIZE), "test" + j);
|
||||
} else {
|
||||
map.remove(rnd.nextInt(Builder.SIZE));
|
||||
if (rnd.nextBoolean()) {
|
||||
map.put(rnd.nextInt(Builder.SIZE), "test" + j);
|
||||
} else {
|
||||
map.remove(rnd.nextInt(Builder.SIZE));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Thread.sleep(1000);
|
||||
Thread.sleep(1000);
|
||||
System.out.println("\nwaiting till equal");
|
||||
|
||||
waitTillEqual(10000);
|
||||
waitTillEqual(10000);
|
||||
|
||||
Assert.assertEquals(new TreeMap(map1), new TreeMap(map2));
|
||||
Assert.assertEquals(map1, map2);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user