use of com.cubrid.cubridmanager.core.common.task.CommonUpdateTask in project cubrid-manager by CUBRID.
the class OptimizeTaskTest method testEmptyDbname.
public void testEmptyDbname() {
if (StringUtil.isEqual(SystemParameter.getParameterValue("useMockTest"), "n"))
return;
System.out.println("<database.optimizedb.004.req.txt>");
CommonUpdateTask task = new CommonUpdateTask(CommonTaskName.OPTIMIZE_DATABASE_TASK_NAME, serverInfo, CommonSendMsg.getOptimizeDbSendMsg());
task.setDbName("");
task.execute();
assertFalse(task.isSuccess());
assertNotNull(task.getErrorMsg());
}
use of com.cubrid.cubridmanager.core.common.task.CommonUpdateTask in project cubrid-manager by CUBRID.
the class StopDbTaskTest method testStopDbNotExist.
public void testStopDbNotExist() {
if (StringUtil.isEqual(SystemParameter.getParameterValue("useMockTest"), "n"))
return;
System.out.println("<database.stopdb.002.req.txt>");
CommonUpdateTask task = new CommonUpdateTask(CommonTaskName.STOP_DB_TASK_NAME, ServerManager.getInstance().getServer(host, monport, userName), CommonSendMsg.getCommonDatabaseSendMsg());
task.setDbName("notexistdb");
task.execute();
assertTrue(task.isSuccess());
assertNull(task.getErrorMsg());
}
use of com.cubrid.cubridmanager.core.common.task.CommonUpdateTask in project cubrid-manager by CUBRID.
the class StopDbTaskTest method testStopDbEmpty.
public void testStopDbEmpty() {
if (StringUtil.isEqual(SystemParameter.getParameterValue("useMockTest"), "n"))
return;
System.out.println("<database.stopdb.004.req.txt>");
CommonUpdateTask task = new CommonUpdateTask(CommonTaskName.STOP_DB_TASK_NAME, ServerManager.getInstance().getServer(host, monport, userName), CommonSendMsg.getCommonDatabaseSendMsg());
task.setDbName(null);
task.execute();
assertFalse(task.isSuccess());
assertNotNull(task.getErrorMsg());
}
use of com.cubrid.cubridmanager.core.common.task.CommonUpdateTask in project cubrid-manager by CUBRID.
the class DeleteDbTaskTest method testDeleteNotExistDb.
public void testDeleteNotExistDb() {
if (StringUtil.isEqual(SystemParameter.getParameterValue("useMockTest"), "n"))
return;
System.out.println("<database.deletedb.001.req.txt>");
CommonUpdateTask task = new CommonUpdateTask(CommonTaskName.DELETE_DATABASE_TASK_NAME, serverInfo, CommonSendMsg.getDeletedbSendMsg());
task.setDbName("notexistdb");
task.setDelbackup(YesNoType.Y);
task.execute();
assertFalse(task.isSuccess());
assertNotNull(task.getErrorMsg());
}
use of com.cubrid.cubridmanager.core.common.task.CommonUpdateTask in project cubrid-manager by CUBRID.
the class OptimizeTaskTest method testNotExistClassnameOnExistDatabase.
public void testNotExistClassnameOnExistDatabase() {
if (StringUtil.isEqual(SystemParameter.getParameterValue("useMockTest"), "n"))
return;
System.out.println("<database.optimizedb.005.req.txt>");
CommonUpdateTask task = new CommonUpdateTask(CommonTaskName.OPTIMIZE_DATABASE_TASK_NAME, serverInfo, CommonSendMsg.getOptimizeDbSendMsg());
task.setDbName("demodb");
task.setClassName("notexistclassname");
task.execute();
assertFalse(task.isSuccess());
assertNotNull(task.getErrorMsg());
}
Aggregations