use of com.ctrip.xpipe.redis.meta.server.dcchange.ExecutionLog in project x-pipe by ctripcorp.
the class DefaultSentinelManagerTest method beforeDefaultSentinelManagerTest.
@Before
public void beforeDefaultSentinelManagerTest() throws Exception {
sentinelManager = new DefaultSentinelManager(dcMetaCache, getXpipeNettyClientKeyedObjectPool());
executionLog = new ExecutionLog(currentTestName());
redisMaster = new RedisMeta().setIp("127.0.0.1").setPort(port);
when(dcMetaCache.getSentinelMonitorName(getClusterId(), getShardId())).thenReturn(sentinelMonitorName);
when(dcMetaCache.getSentinel(getClusterId(), getShardId())).thenReturn(new SentinelMeta().setAddress(allSentinels));
}
use of com.ctrip.xpipe.redis.meta.server.dcchange.ExecutionLog in project x-pipe by ctripcorp.
the class BecomeBackupActionTest method test.
@Test
public void test() throws Exception {
BecomeBackupAction becomeBackupAction = new BecomeBackupAction(dcMetaCache, currentMetaManager, sentinelManager, new ExecutionLog(currentTestName()), getXpipeNettyClientKeyedObjectPool(), multiDcService, scheduled, executors);
PrimaryDcChangeMessage message = becomeBackupAction.changePrimaryDc(getClusterId(), getShardId(), newPrimaryDc, new MasterInfo());
logger.info("{}", message);
}
Aggregations