mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-02 17:24:50 -05:00
Add error handling for Azure Exceptions (#177)
* Add error handling for Azure Exceptions * Add SRGen for string * Add specific exception messages * Move DefinitionResult class * Add SqlLogin constant * Add error scenarios * revert timeout duration * Modify tests * Modify tests * Add tests * Revert live connection definition * Modify DefinitionsHandlerWithNoConnectionTest * fix test after merge * Code review changes * Code review changes * Code review changes
This commit is contained in:
@@ -194,7 +194,7 @@ namespace Microsoft.SqlTools.Test.Utility
|
||||
return connInfo;
|
||||
}
|
||||
|
||||
public static ServerConnection InitLiveConnectionInfoForDefinition()
|
||||
public static ConnectionInfo InitLiveConnectionInfoForDefinition()
|
||||
{
|
||||
TestObjects.InitializeTestServices();
|
||||
|
||||
@@ -212,7 +212,11 @@ namespace Microsoft.SqlTools.Test.Utility
|
||||
|
||||
ConnectionInfo connInfo = null;
|
||||
connectionService.TryFindConnection(ownerUri, out connInfo);
|
||||
|
||||
return connInfo;
|
||||
}
|
||||
|
||||
public static ServerConnection InitLiveServerConnectionForDefinition(ConnectionInfo connInfo)
|
||||
{
|
||||
SqlConnection sqlConn = new SqlConnection(ConnectionService.BuildConnectionString(connInfo.ConnectionDetails));
|
||||
return new ServerConnection(sqlConn);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user