Search in sources :

Example 21 with CommonUpdateTask

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());
}
Also used : CommonUpdateTask(com.cubrid.cubridmanager.core.common.task.CommonUpdateTask)

Example 22 with CommonUpdateTask

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());
}
Also used : CommonUpdateTask(com.cubrid.cubridmanager.core.common.task.CommonUpdateTask)

Example 23 with CommonUpdateTask

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());
}
Also used : CommonUpdateTask(com.cubrid.cubridmanager.core.common.task.CommonUpdateTask)

Example 24 with CommonUpdateTask

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());
}
Also used : CommonUpdateTask(com.cubrid.cubridmanager.core.common.task.CommonUpdateTask)

Example 25 with CommonUpdateTask

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());
}
Also used : CommonUpdateTask(com.cubrid.cubridmanager.core.common.task.CommonUpdateTask)

Aggregations

CommonUpdateTask (com.cubrid.cubridmanager.core.common.task.CommonUpdateTask)40 ITask (com.cubrid.common.core.task.ITask)9 ServerInfo (com.cubrid.cubridmanager.core.common.model.ServerInfo)7 GetDatabaseListTask (com.cubrid.cubridmanager.core.cubrid.database.task.GetDatabaseListTask)7 Display (org.eclipse.swt.widgets.Display)7 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)6 ExecTaskWithProgress (com.cubrid.common.ui.spi.progress.ExecTaskWithProgress)5 JobFamily (com.cubrid.common.ui.spi.progress.JobFamily)5 TaskExecutor (com.cubrid.common.ui.spi.progress.TaskExecutor)5 GetCubridConfParameterTask (com.cubrid.cubridmanager.core.common.task.GetCubridConfParameterTask)5 MonitoringTask (com.cubrid.cubridmanager.core.common.task.MonitoringTask)5 SetCubridConfParameterTask (com.cubrid.cubridmanager.core.common.task.SetCubridConfParameterTask)5 DatabaseInfo (com.cubrid.cubridmanager.core.cubrid.database.model.DatabaseInfo)5 CubridDatabase (com.cubrid.common.ui.spi.model.CubridDatabase)4 ISchemaNode (com.cubrid.common.ui.spi.model.ISchemaNode)4 GetReplServerStatusTask (com.cubrid.cubridmanager.core.replication.task.GetReplServerStatusTask)4 StopReplServerTask (com.cubrid.cubridmanager.core.replication.task.StopReplServerTask)4 CubridNodeChangedEvent (com.cubrid.common.ui.spi.event.CubridNodeChangedEvent)3 TaskJobExecutor (com.cubrid.common.ui.spi.progress.TaskJobExecutor)3 MonitorDashboardPreference (com.cubrid.cubridmanager.ui.mondashboard.preference.MonitorDashboardPreference)3