Search in sources :

Example 26 with CommonUpdateTask

use of com.cubrid.cubridmanager.core.common.task.CommonUpdateTask in project cubrid-manager by CUBRID.

the class StartDbTaskTest method testStartDbDemo.

public void testStartDbDemo() {
    if (StringUtil.isEqual(SystemParameter.getParameterValue("useMockTest"), "n"))
        return;
    System.out.println("<database.startdb.001.req.txt>");
    CommonUpdateTask task = new CommonUpdateTask(CommonTaskName.START_DB_TASK_NAME, ServerManager.getInstance().getServer(host, monport, userName), CommonSendMsg.getCommonDatabaseSendMsg());
    task.setDbName("demodb");
    task.execute();
    assertTrue(task.isSuccess());
    assertNull(task.getErrorMsg());
}
Also used : CommonUpdateTask(com.cubrid.cubridmanager.core.common.task.CommonUpdateTask)

Example 27 with CommonUpdateTask

use of com.cubrid.cubridmanager.core.common.task.CommonUpdateTask in project cubrid-manager by CUBRID.

the class StartDbTaskTest method testStartDbNotExist.

public void testStartDbNotExist() {
    if (StringUtil.isEqual(SystemParameter.getParameterValue("useMockTest"), "n"))
        return;
    System.out.println("<database.startdb.002.req.txt>");
    CommonUpdateTask task = new CommonUpdateTask(CommonTaskName.START_DB_TASK_NAME, ServerManager.getInstance().getServer(host, monport, userName), CommonSendMsg.getCommonDatabaseSendMsg());
    task.setDbName("notexistdb");
    task.execute();
    assertFalse(task.isSuccess());
    assertNotNull(task.getErrorMsg());
}
Also used : CommonUpdateTask(com.cubrid.cubridmanager.core.common.task.CommonUpdateTask)

Example 28 with CommonUpdateTask

use of com.cubrid.cubridmanager.core.common.task.CommonUpdateTask in project cubrid-manager by CUBRID.

the class StopDbTaskTest method testStopDbDemo.

public void testStopDbDemo() {
    if (StringUtil.isEqual(SystemParameter.getParameterValue("useMockTest"), "n"))
        return;
    System.out.println("<database.stopdb.001.req.txt>");
    CommonUpdateTask task = new CommonUpdateTask(CommonTaskName.STOP_DB_TASK_NAME, ServerManager.getInstance().getServer(host, monport, userName), CommonSendMsg.getCommonDatabaseSendMsg());
    task.setDbName("demodb");
    task.execute();
    assertTrue(task.isSuccess());
    assertNull(task.getErrorMsg());
}
Also used : CommonUpdateTask(com.cubrid.cubridmanager.core.common.task.CommonUpdateTask)

Example 29 with CommonUpdateTask

use of com.cubrid.cubridmanager.core.common.task.CommonUpdateTask in project cubrid-manager by CUBRID.

the class CheckDbTaskTest method testExistDb.

public void testExistDb() {
    if (StringUtil.isEqual(SystemParameter.getParameterValue("useMockTest"), "n"))
        return;
    System.out.println("<database.checkdb.001.req.txt>");
    CommonUpdateTask task = new CommonUpdateTask(CommonTaskName.CHECK_DATABASE_TASK_NAME, ServerManager.getInstance().getServer(host, monport, userName), CommonSendMsg.getCommonDatabaseSendMsg());
    task.setDbName("demodb");
    task.execute();
    assertTrue(task.isSuccess());
    assertNull(task.getErrorMsg());
}
Also used : CommonUpdateTask(com.cubrid.cubridmanager.core.common.task.CommonUpdateTask)

Example 30 with CommonUpdateTask

use of com.cubrid.cubridmanager.core.common.task.CommonUpdateTask in project cubrid-manager by CUBRID.

the class CompactDbTaskTest method testNotExistDb.

public void testNotExistDb() {
    if (StringUtil.isEqual(SystemParameter.getParameterValue("useMockTest"), "n"))
        return;
    System.out.println("<database.compactdb.003.req.txt>");
    CommonUpdateTask task = new CommonUpdateTask(CommonTaskName.COMPACT_DATABASE_TASK_NANE, ServerManager.getInstance().getServer(host, monport, userName), CommonSendMsg.getCompactDbSendMsg());
    task.setDbName("notexistdb");
    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