mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-24 17:24:14 -05:00
Support updating access token when found expired for OE (#1772)
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
@@ -295,7 +295,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.ObjectExplorer
|
||||
public void FindNodeCanExpandParentNodes()
|
||||
{
|
||||
var mockTreeNode = new Mock<TreeNode>();
|
||||
object[] populateChildrenArguments = { ItExpr.Is<bool>(x => x == false), ItExpr.IsNull<string>(), new CancellationToken() };
|
||||
object[] populateChildrenArguments = { ItExpr.Is<bool>(x => x == false), ItExpr.IsNull<string>(), new CancellationToken(), ItExpr.IsNull<string>() };
|
||||
mockTreeNode.Protected().Setup("PopulateChildren", populateChildrenArguments);
|
||||
mockTreeNode.Object.IsAlwaysLeaf = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user