use of com.cubrid.cubridmanager.core.common.model.EnvInfo in project cubrid-manager by CUBRID.
the class FunctionsSupportedInfoProviderTest method testGetIndexScanOIDBufferPagesValueType.
/**
* Test method for
* {@link com.cubrid.common.core.util.CompatibleUtil#getIndexScanOIDBufferPagesValueType(com.cubrid.cubridmanager.core.common.model.ServerInfo)}
* .
*/
public void testGetIndexScanOIDBufferPagesValueType() {
EnvInfo envInfo = new EnvInfo();
envInfo.setServerVersion("CUBRID 2008 R2.0(8.2.0.1150)");
ServerInfo serverInfo = new ServerInfo();
serverInfo.setConnected(true);
serverInfo.setEnvInfo(envInfo);
String value = CompatibleUtil.getIndexScanOIDBufferPagesValueType(serverInfo);
assertEquals("int(v>=1&&v<=16)", value);
envInfo.setServerVersion("CUBRID 2008 R2.0(8.3.2.1150)");
value = CompatibleUtil.getIndexScanOIDBufferPagesValueType(serverInfo);
assertEquals("float(v>=0.05&&v<=16)", value);
}
use of com.cubrid.cubridmanager.core.common.model.EnvInfo in project cubrid-manager by CUBRID.
the class FunctionsSupportedInfoProviderTest method testIsSupportJDBCCancel.
/**
* Test method for
* {@link com.cubrid.common.core.util.CompatibleUtil#isSupportJDBCCancel(com.cubrid.cubridmanager.core.common.model.ServerInfo)}
* .
*/
public void testIsSupportJDBCCancel() {
EnvInfo envInfo = new EnvInfo();
ServerInfo serverInfo = new ServerInfo();
serverInfo.setConnected(true);
serverInfo.setEnvInfo(envInfo);
boolean support = CompatibleUtil.isSupportJDBCCancel(serverInfo);
assertTrue(support);
support = CompatibleUtil.isSupportJDBCCancel(null);
assertTrue(support);
envInfo.setOsInfo(FileUtil.OsInfoType.LINUX.toString());
support = CompatibleUtil.isSupportJDBCCancel(serverInfo);
assertTrue(support);
envInfo.setOsInfo(FileUtil.OsInfoType.NT.toString());
support = CompatibleUtil.isSupportJDBCCancel(serverInfo);
assertFalse(support);
}
use of com.cubrid.cubridmanager.core.common.model.EnvInfo in project cubrid-manager by CUBRID.
the class FunctionsSupportedInfoProviderTest method testIsSupportVerbose.
/**
* Test method for
* {@link com.cubrid.common.core.util.CompatibleUtil#isSupportVerbose(com.cubrid.cubridmanager.core.common.model.ServerInfo)}
* .
*/
public void testIsSupportVerbose() {
EnvInfo envInfo = new EnvInfo();
envInfo.setServerVersion("CUBRID 2008 R2.0(8.2.0.1150)");
ServerInfo serverInfo = new ServerInfo();
serverInfo.setConnected(true);
serverInfo.setEnvInfo(envInfo);
boolean support = CompatibleUtil.isSupportVerbose(serverInfo);
assertFalse(support);
}
use of com.cubrid.cubridmanager.core.common.model.EnvInfo in project cubrid-manager by CUBRID.
the class FunctionsSupportedInfoProviderTest method testIsSupportNewHAParam.
/**
* Test method for
* {@link com.cubrid.common.core.util.CompatibleUtil#isSupportNewHABrokerParam(ServerInfo)}
* .
*/
public void testIsSupportNewHAParam() {
EnvInfo envInfo = new EnvInfo();
envInfo.setServerVersion("CUBRID 2008 R2.0(8.3.0.1150)");
ServerInfo serverInfo = new ServerInfo();
serverInfo.setConnected(true);
serverInfo.setEnvInfo(envInfo);
boolean support = CompatibleUtil.isSupportNewHABrokerParam(serverInfo);
assertFalse(support);
envInfo.setServerVersion("CUBRID 2008 R2.0(8.4.0.1150)");
envInfo.setOsInfo(FileUtil.OsInfoType.NT.toString());
support = CompatibleUtil.isSupportNewHABrokerParam(serverInfo);
assertFalse(support);
support = CompatibleUtil.isSupportNewHABrokerParam(null);
assertFalse(support);
}
use of com.cubrid.cubridmanager.core.common.model.EnvInfo in project cubrid-manager by CUBRID.
the class DBSpaceLabelProvider method loadDbServerData.
public void loadDbServerData() {
final GetEnvInfoTask getEnvInfoTask = new GetEnvInfoTask(serverInfo);
TaskJobExecutor taskJobExec = new CommonTaskJobExec(new ITaskExecutorInterceptor() {
public void completeAll() {
EnvInfo envInfo = getEnvInfoTask.loadEnvInfo();
StringBuilder sb = new StringBuilder();
if (envInfo != null) {
sb.append(" ").append(Messages.lblHost + serverInfo.getHostAddress() + ":" + serverInfo.getHostMonPort()).append(StringUtil.NEWLINE);
sb.append(" ").append(Messages.lblDBVersion + envInfo.getServerVersion()).append(StringUtil.NEWLINE);
sb.append(" ").append(Messages.lblBrokerVersion + envInfo.getBrokerVersion()).append(StringUtil.NEWLINE);
sb.append(" ").append(Messages.lblCubridPath + envInfo.getRootDir()).append(StringUtil.NEWLINE);
sb.append(" ").append(Messages.lblDBPath + envInfo.getDatabaseDir()).append(StringUtil.NEWLINE);
}
setDbServerData(sb.toString());
finishedCount++;
updateToolBar();
}
public IStatus postTaskFinished(ITask task) {
return Status.OK_STATUS;
}
});
taskJobExec.addTask(getEnvInfoTask);
String serverName = serverInfo.getServerName();
String jobName = Messages.taskGetServerInfo + serverName;
JobFamily jobFamily = new JobFamily();
jobFamily.setServerName(serverName);
taskJobExec.schedule(jobName, jobFamily, false, Job.SHORT);
}
Aggregations