Skip to content

Commit 7625e0f

Browse files
committed
Disable for azure.
1 parent ac757fa commit 7625e0f

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/RetryLogic/SqlConnectionReliabilityTest.cs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ public class SqlConnectionReliabilityTest
2424
deltaTime: TimeSpan.FromMilliseconds(250));
2525

2626
// Test relies on error 4060 for automatic retry, which is not reliable when using Azure or AAD auth
27-
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup))]
27+
// Restricted to non azure: https://github.com/dotnet/SqlClient/issues/3821
28+
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureServer))]
2829
[MemberData(nameof(ConnectionRetryOpenInvalidCatalogFailed_Data), DisableDiscoveryEnumeration = true)]
2930
public void ConnectionRetryOpenInvalidCatalogFailed(string cnnString, SqlRetryLogicBaseProvider provider)
3031
{
@@ -48,7 +49,8 @@ public void ConnectionRetryOpenInvalidCatalogFailed(string cnnString, SqlRetryLo
4849
deltaTime: TimeSpan.FromMilliseconds(250));
4950

5051
// Test relies on error 4060 for automatic retry, which is not reliable when using Azure or AAD auth
51-
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup))]
52+
// Restricted to non azure: https://github.com/dotnet/SqlClient/issues/3821
53+
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureServer))]
5254
[MemberData(nameof(ConnectionCancelRetryOpenInvalidCatalog_Data), DisableDiscoveryEnumeration = true)]
5355
public void ConnectionCancelRetryOpenInvalidCatalog(string cnnString, SqlRetryLogicBaseProvider provider)
5456
{
@@ -124,7 +126,8 @@ public void CreateDatabaseWhileTryingToConnect(string cnnString, SqlRetryLogicBa
124126
maxInterval: TimeSpan.FromSeconds(1),
125127
deltaTime: TimeSpan.FromMilliseconds(250));
126128

127-
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup))]
129+
// Restricted to non azure: https://github.com/dotnet/SqlClient/issues/3821
130+
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureServer))]
128131
[MemberData(nameof(ConcurrentExecution_Data), DisableDiscoveryEnumeration = true)]
129132
public void ConcurrentExecution(string cnnString, SqlRetryLogicBaseProvider provider)
130133
{
@@ -159,7 +162,8 @@ public void ConcurrentExecution(string cnnString, SqlRetryLogicBaseProvider prov
159162
public static TheoryData<string, SqlRetryLogicBaseProvider> DefaultOpenWithoutRetry_Data =>
160163
RetryLogicTestHelper.GetNonRetriableCases();
161164

162-
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup))]
165+
// Restricted to non azure: https://github.com/dotnet/SqlClient/issues/3821
166+
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureServer))]
163167
[MemberData(nameof(DefaultOpenWithoutRetry_Data), DisableDiscoveryEnumeration = true)]
164168
public void DefaultOpenWithoutRetry(string connectionString, SqlRetryLogicBaseProvider cnnProvider)
165169
{
@@ -191,7 +195,8 @@ public void DefaultOpenWithoutRetry(string connectionString, SqlRetryLogicBasePr
191195
deltaTime: TimeSpan.FromMilliseconds(250));
192196

193197
// Test relies on error 4060 for automatic retry, which is not reliable when using Azure or AAD auth
194-
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup))]
198+
// Restricted to non azure: https://github.com/dotnet/SqlClient/issues/3821
199+
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureServer))]
195200
[MemberData(nameof(ConnectionRetryOpenAsyncInvalidCatalogFailed_Data), DisableDiscoveryEnumeration = true)]
196201
public async Task ConnectionRetryOpenAsyncInvalidCatalogFailed(string cnnString, SqlRetryLogicBaseProvider provider)
197202
{
@@ -215,7 +220,8 @@ public async Task ConnectionRetryOpenAsyncInvalidCatalogFailed(string cnnString,
215220
deltaTime: TimeSpan.FromMilliseconds(250));
216221

217222
// Test relies on error 4060 for automatic retry, which is not returned when using AAD auth
218-
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.TcpConnectionStringDoesNotUseAadAuth))]
223+
// Restricted to non azure: https://github.com/dotnet/SqlClient/issues/3821
224+
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.TcpConnectionStringDoesNotUseAadAuth), nameof(DataTestUtility.IsNotAzureServer))]
219225
[MemberData(nameof(ConnectionCancelRetryOpenAsyncInvalidCatalog_Data), DisableDiscoveryEnumeration = true)]
220226
public async Task ConnectionCancelRetryOpenAsyncInvalidCatalog(string cnnString, SqlRetryLogicBaseProvider provider)
221227
{

0 commit comments

Comments
 (0)