Shift Redis/Sentinel instances to remove unused index

* Redis instances : 6, 7, 8 -> 5, 6, 7
* Sentinel instances : 4 -> 3
This commit is contained in:
Jungtaek Lim
2014-02-15 20:22:50 +09:00
parent ef95688701
commit 05d63bbda4
5 changed files with 33 additions and 37 deletions

View File

@@ -23,7 +23,6 @@ public class HostAndPortUtil {
sentinelHostAndPortList.add(new HostAndPort("localhost", Protocol.DEFAULT_SENTINEL_PORT));
sentinelHostAndPortList.add(new HostAndPort("localhost", Protocol.DEFAULT_SENTINEL_PORT + 1));
sentinelHostAndPortList.add(new HostAndPort("localhost", Protocol.DEFAULT_SENTINEL_PORT + 2));
sentinelHostAndPortList.add(new HostAndPort("localhost", Protocol.DEFAULT_SENTINEL_PORT + 3));
clusterHostAndPortList.add(new HostAndPort("localhost", 7379));
clusterHostAndPortList.add(new HostAndPort("localhost", 7380));

View File

@@ -21,8 +21,6 @@ public class JedisSentinelPoolTest extends JedisTestBase {
.get(2);
protected static HostAndPort slave1 = HostAndPortUtil.getRedisServers()
.get(3);
protected static HostAndPort slave2 = HostAndPortUtil.getRedisServers()
.get(4);
protected static HostAndPort sentinel1 = HostAndPortUtil
.getSentinelServers().get(1);

View File

@@ -22,15 +22,15 @@ public class JedisSentinelTest extends JedisTestBase {
protected static HostAndPort master = HostAndPortUtil.getRedisServers()
.get(0);
protected static HostAndPort slave = HostAndPortUtil.getRedisServers().get(
5);
protected static HostAndPort slave = HostAndPortUtil.getRedisServers()
.get(4);
protected static HostAndPort sentinel = HostAndPortUtil
.getSentinelServers().get(0);
protected static HostAndPort sentinelForFailover = HostAndPortUtil
.getSentinelServers().get(3);
.getSentinelServers().get(2);
protected static HostAndPort masterForFailover = HostAndPortUtil
.getRedisServers().get(6);
.getRedisServers().get(5);
@Before
public void setup() throws InterruptedException {
@@ -87,11 +87,10 @@ public class JedisSentinelTest extends JedisTestBase {
sentinelForFailover.getPort());
try {
HostAndPort currentMaster = new HostAndPort(
masterForFailover.getHost(), masterForFailover.getPort());
List<String> masterHostAndPort = j
.sentinelGetMasterAddrByName(FAILOVER_MASTER_NAME);
HostAndPort currentMaster = new HostAndPort(masterHostAndPort.get(0),
Integer.parseInt(masterHostAndPort.get(1)));
String result = j.sentinelFailover(FAILOVER_MASTER_NAME);
assertEquals("OK", result);