/**
* Tests connect-disconnect-connect sequence for a group with two members
**/
public void testDisconnectConnectTwo() throws Exception {
View view;
JChannel coordinator=new JChannel(props);
coordinator.connect("testgroup");
view=coordinator.getView();
System.out.println("-- view for coordinator: " + view);
channel=new JChannel(props);
channel.connect("testgroup1");
view=channel.getView();
System.out.println("-- view for channel: " + view);
channel.disconnect();
channel.connect("testgroup");
view=channel.getView();
System.out.println("-- view for channel: " + view);
assertEquals(2, view.size());
assertTrue(view.containsMember(channel.getLocalAddress()));
assertTrue(view.containsMember(coordinator.getLocalAddress()));
coordinator.close();
channel.close();
System.out.println("Remaining threads are:");
Util.printThreads();
}