Search in sources :

Example 31 with AppDesc

use of com.sohu.cache.entity.AppDesc in project cachecloud by sohutv.

the class ImportAppCenterTest method testCheckClusterNodes.

@Test
public void testCheckClusterNodes() {
    // 应用信息
    AppDesc appDesc = new AppDesc();
    appDesc.setName("carlosfu13");
    // 实例信息
    String appInstanceInfo = "10.10.53.159:8000:512\n" + "10.10.53.159:8001:512\n" + "10.10.53.159:8002:512\n" + "10.10.53.159:8003:512\n" + "10.10.53.159:8004:512\n" + "10.10.53.159:8005:512\n";
    ImportAppResult importAppResult = importAppCenter.check(appDesc, appInstanceInfo);
    logger.info("importAppResult: {}", importAppResult);
}
Also used : ImportAppResult(com.sohu.cache.constant.ImportAppResult) AppDesc(com.sohu.cache.entity.AppDesc) BaseTest(com.sohu.test.BaseTest) Test(org.junit.Test)

Example 32 with AppDesc

use of com.sohu.cache.entity.AppDesc in project cachecloud by sohutv.

the class ImportAppCenterTest method testCheckWrongFormatAppInstanceInfo2.

/**
     * 应用实例详情格式有问题1
     */
@Test
public void testCheckWrongFormatAppInstanceInfo2() {
    // 应用信息
    AppDesc appDesc = new AppDesc();
    appDesc.setName("carlosfu2");
    // 实例信息
    String appInstanceInfo = "\n10.10.53.159:6379:1024";
    ImportAppResult importAppResult = importAppCenter.check(appDesc, appInstanceInfo);
    logger.info("importAppResult: {}", importAppResult);
}
Also used : ImportAppResult(com.sohu.cache.constant.ImportAppResult) AppDesc(com.sohu.cache.entity.AppDesc) BaseTest(com.sohu.test.BaseTest) Test(org.junit.Test)

Example 33 with AppDesc

use of com.sohu.cache.entity.AppDesc in project cachecloud by sohutv.

the class ImportAppCenterTest method testCheckAppDuplicateName.

/**
     * 重复应用名
     */
@Test
public void testCheckAppDuplicateName() {
    // 应用信息
    AppDesc appDesc = new AppDesc();
    appDesc.setName("redis-cluster-test");
    // 实例信息
    String appInstanceInfo = "";
    ImportAppResult importAppResult = importAppCenter.check(appDesc, appInstanceInfo);
    logger.info("importAppResult: {}", importAppResult);
}
Also used : ImportAppResult(com.sohu.cache.constant.ImportAppResult) AppDesc(com.sohu.cache.entity.AppDesc) BaseTest(com.sohu.test.BaseTest) Test(org.junit.Test)

Example 34 with AppDesc

use of com.sohu.cache.entity.AppDesc in project cachecloud by sohutv.

the class ImportAppCenterTest method testCheckWrongFormatAppInstanceInfo3.

/**
     * 应用实例详情格式有问题2
     */
@Test
public void testCheckWrongFormatAppInstanceInfo3() {
    // 应用信息
    AppDesc appDesc = new AppDesc();
    appDesc.setName("carlosfu3");
    // 实例信息
    String appInstanceInfo = "10.10.53.159:6379";
    ImportAppResult importAppResult = importAppCenter.check(appDesc, appInstanceInfo);
    logger.info("importAppResult: {}", importAppResult);
}
Also used : ImportAppResult(com.sohu.cache.constant.ImportAppResult) AppDesc(com.sohu.cache.entity.AppDesc) BaseTest(com.sohu.test.BaseTest) Test(org.junit.Test)

Example 35 with AppDesc

use of com.sohu.cache.entity.AppDesc in project cachecloud by sohutv.

the class ImportAppCenterTest method testCheckWrongFormatAppInstanceInfo4.

/**
     * 应用实例详情格式有问题4
     */
@Test
public void testCheckWrongFormatAppInstanceInfo4() {
    // 应用信息
    AppDesc appDesc = new AppDesc();
    appDesc.setName("carlosfu4");
    // 实例信息
    String appInstanceInfo = "10.10.10.10:6379:1024";
    ImportAppResult importAppResult = importAppCenter.check(appDesc, appInstanceInfo);
    logger.info("importAppResult: {}", importAppResult);
}
Also used : ImportAppResult(com.sohu.cache.constant.ImportAppResult) AppDesc(com.sohu.cache.entity.AppDesc) BaseTest(com.sohu.test.BaseTest) Test(org.junit.Test)

Aggregations

AppDesc (com.sohu.cache.entity.AppDesc)47 BaseTest (com.sohu.test.BaseTest)18 Test (org.junit.Test)18 ImportAppResult (com.sohu.cache.constant.ImportAppResult)15 InstanceInfo (com.sohu.cache.entity.InstanceInfo)11 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)7 ModelAndView (org.springframework.web.servlet.ModelAndView)7 Date (java.util.Date)5 Jedis (redis.clients.jedis.Jedis)5 AppAudit (com.sohu.cache.entity.AppAudit)4 InstanceStats (com.sohu.cache.entity.InstanceStats)3 IdempotentConfirmer (com.sohu.cache.util.IdempotentConfirmer)3 ParseException (java.text.ParseException)3 ArrayList (java.util.ArrayList)3 HashMap (java.util.HashMap)3 AppUser (com.sohu.cache.entity.AppUser)2 AppDetailVO (com.sohu.cache.web.vo.AppDetailVO)2 JSONObject (com.alibaba.fastjson.JSONObject)1 AppClientCostTimeTotalStat (com.sohu.cache.entity.AppClientCostTimeTotalStat)1 AppClientExceptionStat (com.sohu.cache.entity.AppClientExceptionStat)1