mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 01:25:36 -05:00
Fix node infinitely loading when a firewall dialog is cancelled (#7970)
* add back icons for azure actions * fix firewall infinite loop * formatting * change message to firewall canceled * fix tests
This commit is contained in:
@@ -246,6 +246,9 @@ export class ConnectionManagementService extends Disposable implements IConnecti
|
||||
if (!connectionResult.connected && !connectionResult.errorHandled) {
|
||||
// If connection fails show the dialog
|
||||
return this.showConnectionDialogOnError(connection, owner, connectionResult, options);
|
||||
} else if (!connectionResult.connected && connectionResult.errorHandled) {
|
||||
// Cancelled firewall dialog
|
||||
return undefined;
|
||||
} else {
|
||||
//Resolve with the connection result
|
||||
return connectionResult;
|
||||
|
||||
@@ -593,8 +593,7 @@ suite('SQL ConnectionManagementService tests', () => {
|
||||
};
|
||||
|
||||
connect(uri, options, false, connectionProfile, error, errorCode, errorCallStack).then(result => {
|
||||
assert.equal(result.connected, expectedConnection);
|
||||
assert.equal(result.errorMessage, connectionResult.errorMessage);
|
||||
assert.equal(result, undefined);
|
||||
verifyShowFirewallRuleDialog(connectionProfile, true);
|
||||
verifyShowConnectionDialog(connectionProfile, ConnectionType.default, uri, true, connectionResult, false);
|
||||
done();
|
||||
|
||||
Reference in New Issue
Block a user