Support updating access token when found expired for OE (#1772)

This commit is contained in:
Cheena Malhotra
2022-11-28 17:42:05 -08:00
committed by GitHub
parent 4866515bde
commit 5cc3e6f657
15 changed files with 194 additions and 47 deletions

View File

@@ -18,9 +18,10 @@ using System.Threading;
namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.Utility
{
public class LiveConnectionException : Exception {
public LiveConnectionException(string message)
: base(message) { }
public class LiveConnectionException : Exception
{
public LiveConnectionException(string message)
: base(message) { }
}
public class LiveConnectionHelper
@@ -48,7 +49,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.Utility
public static TestConnectionResult InitLiveConnectionInfo(string databaseName = null, string ownerUri = null)
=> InitLiveConnectionInfoAsync(databaseName, ownerUri, ServiceLayer.Connection.ConnectionType.Default).ConfigureAwait(false).GetAwaiter().GetResult();
public static async Task<TestConnectionResult> InitLiveConnectionInfoAsync(string databaseName = "master", string ownerUri = null,
public static async Task<TestConnectionResult> InitLiveConnectionInfoAsync(string databaseName = "master", string ownerUri = null,
string connectionType = ServiceLayer.Connection.ConnectionType.Default, TestServerType serverType = TestServerType.OnPrem)
{
ScriptFile scriptFile = null;
@@ -58,7 +59,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.Utility
scriptFile = TestServiceProvider.Instance.WorkspaceService.Workspace.GetFile(ownerUri);
ownerUri = scriptFile.ClientUri;
}
if (string.IsNullOrEmpty(databaseName))
if (string.IsNullOrEmpty(databaseName))
{
databaseName = "master";
}