Search in sources :

Example 6 with KeepercontainerTbl

use of com.ctrip.xpipe.redis.console.model.KeepercontainerTbl in project x-pipe by ctripcorp.

the class KeepercontainerServiceImplTest method testAddKeeperContainer2.

@Test
public void testAddKeeperContainer2() {
    KeeperContainerCreateInfo createInfo = new KeeperContainerCreateInfo().setDcName(dcNames[0]).setKeepercontainerIp("192.168.0.1").setKeepercontainerPort(9090).setKeepercontainerOrgId(3L);
    keepercontainerService.addKeeperContainer(createInfo);
    List<KeepercontainerTbl> result = keepercontainerService.findAllActiveByDcName(dcNames[0]);
    KeepercontainerTbl target = null;
    for (KeepercontainerTbl kc : result) {
        if (kc.getKeepercontainerIp().equals("192.168.0.1") && kc.getKeepercontainerPort() == 9090) {
            target = kc;
            break;
        }
    }
    Assert.assertNotNull(target);
}
Also used : KeepercontainerTbl(com.ctrip.xpipe.redis.console.model.KeepercontainerTbl) KeeperContainerCreateInfo(com.ctrip.xpipe.redis.console.controller.api.data.meta.KeeperContainerCreateInfo) Test(org.junit.Test)

Aggregations

KeepercontainerTbl (com.ctrip.xpipe.redis.console.model.KeepercontainerTbl)6 Test (org.junit.Test)4 KeeperContainerCreateInfo (com.ctrip.xpipe.redis.console.controller.api.data.meta.KeeperContainerCreateInfo)2 Autowired (org.springframework.beans.factory.annotation.Autowired)2 AbstractConsoleTest (com.ctrip.xpipe.redis.console.AbstractConsoleTest)1 XPipeConsoleConstant (com.ctrip.xpipe.redis.console.constant.XPipeConsoleConstant)1 ClusterDao (com.ctrip.xpipe.redis.console.dao.ClusterDao)1 ClusterTbl (com.ctrip.xpipe.redis.console.model.ClusterTbl)1 RedisTbl (com.ctrip.xpipe.redis.console.model.RedisTbl)1 RedisTblDao (com.ctrip.xpipe.redis.console.model.RedisTblDao)1 com.ctrip.xpipe.redis.console.service (com.ctrip.xpipe.redis.console.service)1 RedisProtocol (com.ctrip.xpipe.redis.core.protocal.RedisProtocol)1 AbstractSpringConfigContext (com.ctrip.xpipe.spring.AbstractSpringConfigContext)1 VisibleForTesting (com.ctrip.xpipe.utils.VisibleForTesting)1 Maps (com.google.common.collect.Maps)1 IOException (java.io.IOException)1 java.util (java.util)1 List (java.util.List)1 ExecutionException (java.util.concurrent.ExecutionException)1 ExecutorService (java.util.concurrent.ExecutorService)1