提交 944d74ce 编写于 作者: S Serge Rider

Test connection fix

上级 02591ba4
......@@ -71,15 +71,15 @@ public class ConnectJob extends AbstractJob
}
try {
container.connect(monitor, initialize, reflect);
final boolean connected = container.connect(monitor, initialize, reflect);
connectStatus = connected ? Status.OK_STATUS : Status.CANCEL_STATUS;
} finally {
if (connectThread != null) {
connectThread.setName(oldName);
connectThread = null;
}
}
connectStatus = Status.OK_STATUS;
}
catch (Throwable ex) {
log.debug(ex);
......
......@@ -136,6 +136,9 @@ public abstract class ConnectionWizard extends Wizard implements INewWizard {
if (op.getConnectError() != null) {
throw new InvocationTargetException(op.getConnectError());
}
if (op.getConnectStatus() == Status.CANCEL_STATUS) {
throw new InterruptedException();
}
}
});
......@@ -221,6 +224,9 @@ public abstract class ConnectionWizard extends Wizard implements INewWizard {
if (connectError != null || monitor.isCanceled()) {
return Status.OK_STATUS;
}
if (connectStatus == Status.CANCEL_STATUS) {
return Status.CANCEL_STATUS;
}
monitor.worked(1);
DBPDataSource dataSource = container.getDataSource();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册