*/
SortedSet<String> otherReplServers = new TreeSet<String>();
otherReplServers.add("localhost:" + rs1Port);
otherReplServers.add("localhost:" + rs2Port);
String dir = "groupIdHandshakeTest" + RS3_ID + testCase + "Db";
ReplServerFakeConfiguration rsConfWithNewGid =
new ReplServerFakeConfiguration(rs3Port, dir, 0, RS3_ID, 0, 100,
otherReplServers, 1, 1000, 5000);
rs3.applyConfigurationChange(rsConfWithNewGid);
/**
* Change group id of RS1 to 3: DS1 and DS2 should reconnect to RS3
*/
otherReplServers = new TreeSet<String>();
otherReplServers.add("localhost:" + rs2Port);
otherReplServers.add("localhost:" + rs3Port);
dir = "groupIdHandshakeTest" + RS1_ID + testCase + "Db";
rsConfWithNewGid = new ReplServerFakeConfiguration(rs1Port, dir, 0, RS1_ID,
0, 100, otherReplServers, 3, 1000, 5000);
rs1.applyConfigurationChange(rsConfWithNewGid);
checkConnection(30, DS1_ID, RS3_ID,
"Change GID of RS3 to 1 and RS1 to 3, DS1 should reconnect to RS3 with GID=1");
checkConnection(30, DS2_ID, RS3_ID,