use of com.cubrid.cubridmanager.core.common.socket.TreeNode in project cubrid-manager by CUBRID.
the class GetManagerLogListTask method getLogContentV2.
private ManagerLogInfos getLogContentV2() {
TreeNode response = getResponse();
if (response == null || (this.getErrorMsg() != null && getErrorMsg().trim().length() > 0)) {
return null;
}
ManagerLogInfos managerLogInfos = new ManagerLogInfos();
// for
ManagerLogInfoList managerLogList = new ManagerLogInfoList();
// for
ManagerLogInfoList errorManagerLogList = new ManagerLogInfoList();
String[] users = new String[response.childrenSize()];
String[] tasknames = new String[response.childrenSize()];
String[] times = new String[response.childrenSize()];
String[] errorusers = new String[response.childrenSize()];
String[] errortasknames = new String[response.childrenSize()];
String[] errortimes = new String[response.childrenSize()];
String[] errornotes = new String[response.childrenSize()];
int j = 0, k = 0;
for (int i = 0; i < response.childrenSize(); i++) {
TreeNode node = response.getChildren().get(i);
if (node != null && node.getValue("open") != null && node.getValue("open").equals("accesslog")) {
users[j] = node.getValue("user");
tasknames[j] = node.getValue("taskname");
times[j] = node.getValue("time");
++j;
}
if (node != null && node.getValue("open") != null && node.getValue("open").equals("errorlog")) {
errorusers[k] = node.getValue("user");
errortasknames[k] = node.getValue("taskname");
errortimes[k] = node.getValue("time");
errornotes[k] = node.getValue("errornote");
++k;
}
}
addLogToManagerLogList(managerLogList, users, tasknames, times);
managerLogInfos.setAccessLog(managerLogList);
addLogToManagerLogList(errorManagerLogList, errorusers, errortasknames, errortimes, errornotes);
managerLogInfos.setErrorLog(errorManagerLogList);
return managerLogInfos;
}
use of com.cubrid.cubridmanager.core.common.socket.TreeNode in project cubrid-manager by CUBRID.
the class SetCMConfParameterTaskTest 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/setcmconfpara_receive");
String msg = Tool.getFileContent(filepath);
TreeNode node = MessageUtil.parseResponse(msg);
//compare
assertEquals("success", node.getValue("status"));
}
use of com.cubrid.cubridmanager.core.common.socket.TreeNode in project cubrid-manager by CUBRID.
the class SetHAConfParameterTaskTest 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/sethaconfpara_receive");
String msg = Tool.getFileContent(filepath);
TreeNode node = MessageUtil.parseResponse(msg);
//compare
assertEquals("success", node.getValue("status"));
}
use of com.cubrid.cubridmanager.core.common.socket.TreeNode in project cubrid-manager by CUBRID.
the class UpdateCMUserTaskTest 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/updatecmuser_receive");
String msg = Tool.getFileContent(filepath);
TreeNode node = MessageUtil.parseResponse(msg);
//compare
assertEquals("success", node.getValue("status"));
UpdateCMUserTask task = new UpdateCMUserTask(serverInfo);
task.setDbAuth(null, new String[] { "dba", "dba" }, new String[] { "", "" }, new String[] { "localhost,30000", "localhost,30000" });
task.setDbAuth(new String[] {}, new String[] { "dba", "dba" }, new String[] { "", "" }, new String[] { "localhost,30000", "localhost,30000" });
}
use of com.cubrid.cubridmanager.core.common.socket.TreeNode in project cubrid-manager by CUBRID.
the class CreateDbTaskTest method testReceive.
public void testReceive() throws Exception {
if (StringUtil.isEqual(SystemParameter.getParameterValue("useMockTest"), "y"))
return;
String filepath = this.getFilePathInPlugin("/com/cubrid/cubridmanager/core/cubrid/database/task/test.message/createdb_receive");
String msg = Tool.getFileContent(filepath);
TreeNode node = MessageUtil.parseResponse(msg);
//compare
assertEquals("success", node.getValue("status"));
}
Aggregations