Added retry policy for sleeping serverless error for SqlConnections (#2155)

This commit is contained in:
Alex Ma
2023-08-16 13:17:40 -07:00
committed by GitHub
parent e4db70fb39
commit 4ae9534ac8
15 changed files with 140 additions and 63 deletions

View File

@@ -14,6 +14,7 @@ using Microsoft.SqlTools.ServiceLayer.Connection;
using Microsoft.SqlTools.ServiceLayer.Connection.Contracts;
using Microsoft.SqlTools.ServiceLayer.LanguageServices;
using Microsoft.SqlTools.ServiceLayer.Workspace.Contracts;
using Microsoft.Data.SqlClient;
using Moq;
namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Utility
@@ -353,7 +354,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Utility
/// </summary>
public class TestSqlConnectionFactory : ISqlConnectionFactory
{
public DbConnection CreateSqlConnection(string connectionString, string azureAccountToken)
public DbConnection CreateSqlConnection(string connectionString, string azureAccountToken, SqlRetryLogicBaseProvider retryProvider = null)
{
return new TestSqlConnection(null)
{