Search in sources :

Example 26 with TreeNode

use of com.cubrid.cubridmanager.core.common.socket.TreeNode in project cubrid-manager by CUBRID.

the class GetCMConfParameterTaskTest method testGetContents.

public void testGetContents() throws Exception {
    String filepath = this.getFilePathInPlugin("/com/cubrid/cubridmanager/core/common/task/test.message/getcmconfpara_receive");
    String msg = Tool.getFileContent(filepath);
    TreeNode node = MessageUtil.parseResponse(msg);
    GetCMConfParameterTask task = new GetCMConfParameterTask(serverInfo);
    task.setResponse(node);
    task.getConfContents();
    assertEquals("success", node.getValue("status"));
    task.setResponse(null);
    List<String> list = task.getConfContents();
    assertNull(list);
}
Also used : TreeNode(com.cubrid.cubridmanager.core.common.socket.TreeNode)

Example 27 with TreeNode

use of com.cubrid.cubridmanager.core.common.socket.TreeNode in project cubrid-manager by CUBRID.

the class GetCMUserListTaskTest method testReceive.

public void testReceive() throws Exception {
    if (StringUtil.isEqual(SystemParameter.getParameterValue("useMockTest"), "y"))
        return;
    String filepath = this.getFilePathInPlugin("/com/cubrid/cubridmanager/core/common/task/test.message/getcmuserlist_receive");
    String msg = Tool.getFileContent(filepath);
    TreeNode node = MessageUtil.parseResponse(msg);
    GetCMUserListTask task = new GetCMUserListTask(serverInfo);
    task.setResponse(node);
    task.getServerUserInfoList();
    GetEnvInfoTask envTask = new GetEnvInfoTask(serverInfo);
    envTask.setResponse(null);
    envTask.loadEnvInfo();
    //compare 
    assertEquals("success", node.getValue("status"));
    //case2
    filepath = this.getFilePathInPlugin("/com/cubrid/cubridmanager/core/common/task/test.message/getcmuserlist_receive2");
    msg = Tool.getFileContent(filepath);
    node = MessageUtil.parseResponse(msg);
    GetCMUserListTask task2 = new GetCMUserListTask(serverInfo);
    task2.setResponse(node);
    task2.getServerUserInfoList();
    //case3
    filepath = this.getFilePathInPlugin("/com/cubrid/cubridmanager/core/common/task/test.message/getcmuserlist_receive3");
    msg = Tool.getFileContent(filepath);
    node = MessageUtil.parseResponse(msg);
    GetCMUserListTask task3 = new GetCMUserListTask(serverInfo);
    task3.setResponse(node);
    task3.getServerUserInfoList();
    //exception case1
    task.setResponse(null);
    task.getServerUserInfoList();
    //exception case2
    task.setResponse(node);
    task.setErrorMsg("has error");
    task.getServerUserInfoList();
}
Also used : TreeNode(com.cubrid.cubridmanager.core.common.socket.TreeNode)

Example 28 with TreeNode

use of com.cubrid.cubridmanager.core.common.socket.TreeNode in project cubrid-manager by CUBRID.

the class GetCubridConfParameterTaskTest method testGetContents.

public void testGetContents() throws Exception {
    String filepath = this.getFilePathInPlugin("/com/cubrid/cubridmanager/core/common/task/test.message/getcubridconfpara_receive");
    String msg = Tool.getFileContent(filepath);
    TreeNode node = MessageUtil.parseResponse(msg);
    GetCubridConfParameterTask task = new GetCubridConfParameterTask(serverInfo);
    task.setResponse(node);
    task.getConfContents();
    assertEquals("success", node.getValue("status"));
    task.setResponse(null);
    List<String> list = task.getConfContents();
    assertNull(list);
}
Also used : TreeNode(com.cubrid.cubridmanager.core.common.socket.TreeNode)

Example 29 with TreeNode

use of com.cubrid.cubridmanager.core.common.socket.TreeNode in project cubrid-manager by CUBRID.

the class GetHAConfParameterTaskTest method testGetContents.

public void testGetContents() throws Exception {
    String filepath = this.getFilePathInPlugin("/com/cubrid/cubridmanager/core/common/task/test.message/gethaconfpara_receive");
    String msg = Tool.getFileContent(filepath);
    TreeNode node = MessageUtil.parseResponse(msg);
    GetHAConfParameterTask task = new GetHAConfParameterTask(serverInfo);
    task.setResponse(node);
    task.getConfContents();
    assertEquals("success", node.getValue("status"));
    task.setResponse(null);
    List<String> list = task.getConfContents();
    assertNull(list);
}
Also used : TreeNode(com.cubrid.cubridmanager.core.common.socket.TreeNode)

Example 30 with TreeNode

use of com.cubrid.cubridmanager.core.common.socket.TreeNode in project cubrid-manager by CUBRID.

the class ParamDumpTaskTest method testReceive.

public void testReceive() throws Exception {
    String filepath = this.getFilePathInPlugin("/com/cubrid/cubridmanager/core/cubrid/database/task/test.message/paramdump_receive");
    String msg = Tool.getFileContent(filepath);
    TreeNode node = MessageUtil.parseResponse(msg);
    ParamDumpTask task = new ParamDumpTask(serverInfo);
    task.setResponse(node);
    task.getContent();
    task.setErrorMsg("err");
    task.getContent();
    task.setResponse(null);
    task.getContent();
}
Also used : TreeNode(com.cubrid.cubridmanager.core.common.socket.TreeNode)

Aggregations

TreeNode (com.cubrid.cubridmanager.core.common.socket.TreeNode)142 ArrayList (java.util.ArrayList)20 HashMap (java.util.HashMap)7 Map (java.util.Map)6 Trigger (com.cubrid.common.core.common.model.Trigger)2 ServerInfo (com.cubrid.cubridmanager.core.common.model.ServerInfo)2 ServerUserInfo (com.cubrid.cubridmanager.core.common.model.ServerUserInfo)2 DbBackupInfo (com.cubrid.cubridmanager.core.cubrid.database.model.DbBackupInfo)2 DbUnloadInfo (com.cubrid.cubridmanager.core.cubrid.database.model.DbUnloadInfo)2 DbUserInfo (com.cubrid.cubridmanager.core.cubrid.user.model.DbUserInfo)2 GetExecuteCasRunnerResultInfo (com.cubrid.cubridmanager.core.logs.model.GetExecuteCasRunnerResultInfo)2 ManagerLogInfoList (com.cubrid.cubridmanager.core.logs.model.ManagerLogInfoList)2 ManagerLogInfos (com.cubrid.cubridmanager.core.logs.model.ManagerLogInfos)2 DbProcessStatusInfo (com.cubrid.cubridmanager.core.mondashboard.model.DbProcessStatusInfo)2 HADatabaseStatusInfo (com.cubrid.cubridmanager.core.mondashboard.model.HADatabaseStatusInfo)2 HAHostStatusInfo (com.cubrid.cubridmanager.core.mondashboard.model.HAHostStatusInfo)2 ReplicationInfo (com.cubrid.cubridmanager.core.replication.model.ReplicationInfo)2 ReplicationParamInfo (com.cubrid.cubridmanager.core.replication.model.ReplicationParamInfo)2 TransFileProgressInfo (com.cubrid.cubridmanager.core.replication.model.TransFileProgressInfo)2 CasAuthType (com.cubrid.cubridmanager.core.common.model.CasAuthType)1