Remove double and triple blank lines

This commit is contained in:
Peter Lawrey
2014-11-30 22:43:32 +02:00
parent 6dc1792f19
commit 6d4b143903
83 changed files with 9 additions and 621 deletions
@@ -44,11 +44,9 @@ public class ChannelReplicationTest {
private ChronicleMap<CharSequence, CharSequence> favoriteColourServer2;
private ChronicleMap<CharSequence, CharSequence> favoriteColourServer1;
private ReplicationHub hubOnServer1;
private ReplicationHub hubOnServer2;
@Test
public void test() throws IOException, InterruptedException {
@@ -64,7 +62,6 @@ public class ChannelReplicationTest {
.of(8086, new InetSocketAddress("localhost", 8087))
.heartBeatInterval(1, SECONDS).autoReconnectedUponDroppedConnection(true);
hubOnServer1 = ReplicationHub.builder()
.tcpTransportAndNetwork(tcpConfig)
.createWithId(identifier);
@@ -103,14 +100,12 @@ public class ChannelReplicationTest {
.tcpTransportAndNetwork(tcpConfig)
.createWithId(identifier);
// this demotes favoriteColour
short channel1 = (short) 1;
favoriteColourServer2 = smallStringToStringMapBuilder.instance()
.replicatedViaChannel(hubOnServer2.createChannel(channel1)).create();
favoriteColourServer2.put("rob", "blue");
// this demotes favoriteComputer
@@ -123,7 +118,6 @@ public class ChannelReplicationTest {
favoriteComputerServer2.put("daniel", "mac");
}
// allow time for the recompilation to resolve
for (int t = 0; t < 2500; t++) {
if (favoriteComputerServer2.equals(favoriteComputerServer1) &&
@@ -132,31 +126,25 @@ public class ChannelReplicationTest {
Thread.sleep(1);
}
assertEquals(favoriteComputerServer1, favoriteComputerServer2);
Assert.assertEquals(3, favoriteComputerServer2.size());
assertEquals(favoriteColourServer1, favoriteColourServer2);
Assert.assertEquals(2, favoriteColourServer1.size());
favoriteColourServer1.close();
favoriteComputerServer2.close();
favoriteColourServer2.close();
favoriteComputerServer1.close();
}
@Test
public void testPublishOnOneMapOnlyBootstrapTwice() throws IOException, InterruptedException {
ChronicleMap<CharSequence, CharSequence> favoriteComputerServer3;
ChronicleMap<CharSequence, CharSequence> favoriteColourServer3;
// server 1 with identifier = 1
{
ChronicleMapBuilder<CharSequence, CharSequence> smallStringToStringMapBuilder =
@@ -169,7 +157,6 @@ public class ChannelReplicationTest {
.of(8086)
.heartBeatInterval(1, SECONDS).autoReconnectedUponDroppedConnection(true);
hubOnServer1 = ReplicationHub.builder()
.tcpTransportAndNetwork(tcpConfig)
.createWithId(identifier);
@@ -190,7 +177,6 @@ public class ChannelReplicationTest {
favoriteComputerServer1.put("peter", "dell");
}
// server 2 with identifier = 2
@@ -218,7 +204,6 @@ public class ChannelReplicationTest {
favoriteColourServer2 = instance.create();
}
{
ChronicleMapBuilder<CharSequence, CharSequence> smallStringToStringMapBuilder =
ChronicleMapBuilder.of(CharSequence.class, CharSequence.class)
@@ -235,7 +220,6 @@ public class ChannelReplicationTest {
.tcpTransportAndNetwork(tcpConfig)
.createWithId(identifier);
// this demotes favoriteColour
short channel1 = (short) 1;
@@ -248,10 +232,8 @@ public class ChannelReplicationTest {
favoriteComputerServer3 = smallStringToStringMapBuilder.instance()
.replicatedViaChannel(hubOnServer3.createChannel(channel2)).create();
}
// allow time for the recompilation to resolve
for (int t = 0; t < 250000; t++) {
if (favoriteComputerServer1.equals(favoriteComputerServer3) &&
@@ -261,11 +243,9 @@ public class ChannelReplicationTest {
Thread.sleep(1);
}
assertEquals(favoriteComputerServer3, favoriteComputerServer1);
assertEquals(favoriteColourServer2, favoriteColourServer3);
Assert.assertEquals(1, favoriteColourServer3.size());
Assert.assertEquals(1, favoriteComputerServer1.size());
@@ -275,13 +255,10 @@ public class ChannelReplicationTest {
favoriteComputerServer1.close();
favoriteColourServer1.close();
favoriteColourServer2.close();
}
@Test
public void testPublishOnOneMapOnly() throws IOException, InterruptedException {
@@ -298,7 +275,6 @@ public class ChannelReplicationTest {
.heartBeatInterval(1, SECONDS)
.autoReconnectedUponDroppedConnection(true);
hubOnServer1 = ReplicationHub.builder()
.tcpTransportAndNetwork(tcpConfig)
.createWithId(identifier);
@@ -337,14 +313,12 @@ public class ChannelReplicationTest {
.tcpTransportAndNetwork(tcpConfig)
.createWithId(identifier);
// this demotes favoriteColour
short channel1 = (short) 1;
favoriteColourServer2 = smallStringToStringMapBuilder.instance()
.replicatedViaChannel(hubOnServer2.createChannel(channel1)).create();
// this demotes favoriteComputer
short channel2 = (short) 2;
@@ -352,7 +326,6 @@ public class ChannelReplicationTest {
.replicatedViaChannel(hubOnServer2.createChannel(channel2)).create();
}
// allow time for the recompilation to resolve
for (int t = 0; t < 2500; t++) {
if (favoriteComputerServer2.equals(favoriteComputerServer1) &&
@@ -361,15 +334,12 @@ public class ChannelReplicationTest {
Thread.sleep(1);
}
assertEquals(favoriteComputerServer1, favoriteComputerServer2);
Assert.assertEquals(1, favoriteComputerServer2.size());
assertEquals(favoriteColourServer1, favoriteColourServer2);
Assert.assertEquals(1, favoriteColourServer1.size());
favoriteColourServer1.close();
favoriteComputerServer2.close();
favoriteColourServer2.close();
@@ -377,6 +347,3 @@ public class ChannelReplicationTest {
}
}