提交 31b0c854 编写于 作者: J jurgen

Mongo auth & connection test improvement

上级 6ced9a78
......@@ -36,6 +36,7 @@ public class DBConstants {
public static final String PROP_ID_TYPE_NAME = "typeName"; //NON-NLS-1
public static final String PROP_ID_MAX_LENGTH = "maxLength"; //NON-NLS-1
public static final String PROP_ID_NOT_NULL = "notNull"; //NON-NLS-1
public static final String PARAM_INIT_ON_TEST = "initOnTest"; //NON-NLS-1
public static final String INTERNAL_PROP_PREFIX = "@dbeaver-"; //NON-NLS-1
public static final String DEFAULT_DRIVER_PROP_PREFIX = INTERNAL_PROP_PREFIX + "default-"; //NON-NLS-1
......
......@@ -26,6 +26,7 @@ import org.eclipse.osgi.util.NLS;
import org.eclipse.ui.INewWizard;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.core.CoreMessages;
import org.jkiss.dbeaver.model.DBConstants;
import org.jkiss.dbeaver.model.DBPDataSource;
import org.jkiss.dbeaver.model.DBPDataSourceInfo;
import org.jkiss.dbeaver.model.exec.DBCExecutionPurpose;
......@@ -126,10 +127,12 @@ public abstract class ConnectionWizard extends Wizard implements INewWizard {
String driverName;
String driverVersion;
private final DataSourceDescriptor testDataSource;
private boolean initOnTest;
public ConnectionTester(DataSourceDescriptor testDataSource)
{
this.testDataSource = testDataSource;
this.initOnTest = CommonUtils.toBoolean(testDataSource.getDriver().getDriverParameter(DBConstants.PARAM_INIT_ON_TEST));
productName = null;
productVersion = null;
}
......@@ -143,7 +146,7 @@ public abstract class ConnectionWizard extends Wizard implements INewWizard {
try {
testDataSource.setName(testDataSource.getConnectionInfo().getUrl());
monitor.worked(1);
testDataSource.connect(monitor, false, false);
testDataSource.connect(monitor, initOnTest, false);
monitor.worked(1);
DBPDataSource dataSource = testDataSource.getDataSource();
monitor.subTask(CoreMessages.dialog_connection_wizard_start_connection_monitor_subtask_test);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册