| | |
| | | String serverStr = rd.getReplicationServer(); |
| | | rdPort = HostPort.valueOf(serverStr).getPort(); |
| | | if (rdPort == rsPort) |
| | | { |
| | | rightPort = true; |
| | | } |
| | | } |
| | | if (connected && rightPort) |
| | | { |
| | |
| | | replServers.add("localhost:" + rs1Port); |
| | | replServers.add("localhost:" + rs2Port); |
| | | replServers.add("localhost:" + rs3Port); |
| | | } else |
| | | } |
| | | else |
| | | { |
| | | fail("Unknown test case: " + testCase); |
| | | } |
| | | |
| | | return replServers; |
| | | } |
| | |
| | | replServers.add("localhost:" + rs3Port); |
| | | } |
| | | else |
| | | { |
| | | fail("Unknown test case: " + testCase); |
| | | } |
| | | } |
| | | else if (serverId == RS2_ID) |
| | | { |
| | |
| | | // 3 servers used for this test case. |
| | | replServers.add("localhost:" + rs1Port); |
| | | replServers.add("localhost:" + rs3Port); |
| | | } else |
| | | } |
| | | else |
| | | { |
| | | fail("Unknown test case: " + testCase); |
| | | } |
| | | } |
| | | else if (serverId == RS3_ID) |
| | | { |
| | |
| | | replServers.add("localhost:" + rs3Port); |
| | | } |
| | | else |
| | | { |
| | | fail("Invalid test case: " + testCase); |
| | | } |
| | | } |
| | | else |
| | | { |