Search in sources :

Example 1 with ImportAppResult

use of com.sohu.cache.constant.ImportAppResult in project cachecloud by sohutv.

the class ImportAppCenterTest method testCheckWrongFormatAppInstanceInfo5.

/**
     * 应用实例详情格式有问题5
     */
@Test
public void testCheckWrongFormatAppInstanceInfo5() {
    // 应用信息
    AppDesc appDesc = new AppDesc();
    appDesc.setName("carlosfu5");
    // 实例信息
    String appInstanceInfo = "10.10.53.162:ab: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 2 with ImportAppResult

use of com.sohu.cache.constant.ImportAppResult in project cachecloud by sohutv.

the class ImportAppCenterTest method testCheckNotRunInstance.

/**
     * 已经存在实例信息
     */
@Test
public void testCheckNotRunInstance() {
    // 应用信息
    AppDesc appDesc = new AppDesc();
    appDesc.setName("carlosfu7");
    // 实例信息
    String appInstanceInfo = "10.10.53.162:6399: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 3 with ImportAppResult

use of com.sohu.cache.constant.ImportAppResult in project cachecloud by sohutv.

the class ImportAppCenterTest method testCheckSentinelAllNodes.

/**
     * 检测sentinel节点
     */
@Test
public void testCheckSentinelAllNodes() {
    // 应用信息
    AppDesc appDesc = new AppDesc();
    appDesc.setName("carlosfu12");
    // 实例信息
    String appInstanceInfo = "10.10.53.159:7000:512\n" + "10.10.53.159:7001:512\n" + "10.10.53.159:26379:mymaster\n" + "10.10.53.159:26380:mymaster\n" + "10.10.53.159:26381:mymaster";
    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 4 with ImportAppResult

use of com.sohu.cache.constant.ImportAppResult in project cachecloud by sohutv.

the class ImportAppCenterTest method testCheckExistInstanceInfo.

/**
     * 已经存在实例信息
     */
@Test
public void testCheckExistInstanceInfo() {
    // 应用信息
    AppDesc appDesc = new AppDesc();
    appDesc.setName("carlosfu6");
    // 实例信息
    String appInstanceInfo = "10.10.53.162: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 5 with ImportAppResult

use of com.sohu.cache.constant.ImportAppResult in project cachecloud by sohutv.

the class ImportAppCenterTest method testCheckWrongMaxMemory.

/**
     * 最大内存检查
     */
@Test
public void testCheckWrongMaxMemory() {
    // 应用信息
    AppDesc appDesc = new AppDesc();
    appDesc.setName("carlosfu8");
    // 实例信息
    String appInstanceInfo = "10.10.53.159:6379:aa";
    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

ImportAppResult (com.sohu.cache.constant.ImportAppResult)15 AppDesc (com.sohu.cache.entity.AppDesc)15 BaseTest (com.sohu.test.BaseTest)14 Test (org.junit.Test)14 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1 ModelAndView (org.springframework.web.servlet.ModelAndView)1