From 2a9b27123189c44331d4bbebec119c94bf203b55 Mon Sep 17 00:00:00 2001 From: tolgakavukcuevam Date: Wed, 20 Jan 2016 17:12:30 +0200 Subject: [PATCH] Add more update to test to make sure case matches --- .../map/TCPSocketReplicationBootStrapTest.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/test/java/net/openhft/chronicle/map/TCPSocketReplicationBootStrapTest.java b/src/test/java/net/openhft/chronicle/map/TCPSocketReplicationBootStrapTest.java index b7729af28..72221ee09 100644 --- a/src/test/java/net/openhft/chronicle/map/TCPSocketReplicationBootStrapTest.java +++ b/src/test/java/net/openhft/chronicle/map/TCPSocketReplicationBootStrapTest.java @@ -189,12 +189,13 @@ public class TCPSocketReplicationBootStrapTest { Thread t = new Thread(reader); t.start(); int j = 0; - while (j < 100){ + while (j < 1000){ i = 400; while (i < 500){ channelIdMap.update(Integer.toString(i),i+1); i++; } + Thread.sleep(1); j++; } Thread.sleep(10000); @@ -359,17 +360,12 @@ public class TCPSocketReplicationBootStrapTest { private volatile ChronicleMap chronicleMap; private boolean stop = false; private int firstGatheredSize = 0; - private Object firstGatheredElement; private CacheMapListener mapListener; public MapReaderWithListener() { } public void stop() { - this.stop = false; - while (this.mapListener.firstPuttedValue == null){ - this.stop = false; - } this.stop = true; } @@ -391,7 +387,7 @@ public class TCPSocketReplicationBootStrapTest { while (!stop) { channelIdMap2.size(); } - this.firstGatheredElement = this.mapListener.firstPuttedValue; + ; this.chronicleMap.close(); } catch (Exception e) { e.printStackTrace(); @@ -404,7 +400,7 @@ public class TCPSocketReplicationBootStrapTest { } public Object getFirstGatheredElement() { - return this.firstGatheredElement; + return this.mapListener.firstPuttedValue; } }