use of com.ctrip.xpipe.redis.core.protocal.pojo.Role in project x-pipe by ctripcorp.
the class RoleCommandTest method test.
@Test
public void test() throws Exception {
SlaveRole role = new SlaveRole(SERVER_ROLE.KEEPER, "localhost", randomPort(), MASTER_STATE.REDIS_REPL_CONNECT, 0L);
Server server = startServer(ByteBufUtils.readToString(role.format()));
RoleCommand roleCommand = new RoleCommand("localhost", server.getPort(), scheduled);
Role real = roleCommand.execute().get();
logger.info("[test]{}", real);
Assert.assertEquals(role, real);
}
Aggregations