Small cleanup

This commit is contained in:
Joseph Price
2015-02-21 15:31:23 -05:00
parent 07f47aced6
commit 4aba10d2c3
19 changed files with 193 additions and 164 deletions

View File

@ -2,6 +2,7 @@ package io.teknek.gossip;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.List;
import junit.framework.Assert;
@ -17,25 +18,25 @@ import com.google.code.gossip.event.GossipState;
public class TenNodeThreeSeedTest {
@Test
public void test() throws UnknownHostException, InterruptedException{
abc();
}
@Test
public void testAgain() throws UnknownHostException, InterruptedException{
abc();
}
public void abc() throws InterruptedException, UnknownHostException{
GossipSettings settings = new GossipSettings();
int seedNodes = 3;
ArrayList<GossipMember> startupMembers = new ArrayList<GossipMember>();
List<GossipMember> startupMembers = new ArrayList<>();
for (int i = 1; i < seedNodes+1; ++i) {
startupMembers.add(new RemoteGossipMember("127.0.0." + i, 2000, i + ""));
}
ArrayList<GossipService> clients = new ArrayList<GossipService>();
List<GossipService> clients = new ArrayList<>();
int clusterMembers = 5;
for (int i = 1; i < clusterMembers+1; ++i) {
GossipService gossipService = new GossipService("127.0.0." + i, 2000, i + "", LogLevel.DEBUG,
@ -56,6 +57,6 @@ public class TenNodeThreeSeedTest {
}
for (int i = 0; i < clusterMembers; ++i) {
clients.get(i).shutdown();
}
}
}
}