Skip to content

Commit 6d73cce

Browse files
[7.0.2 Cherry-pick] Tests | Disable Async cancellation tests on Kerberos/Managed Instance pipelines (#4316)
Co-authored-by: Cheena Malhotra <13396919+cheenamalhotra@users.noreply.github.com>
1 parent daa77e6 commit 6d73cce

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/Microsoft.Data.SqlClient/tests/ManualTests/DataCommon/DataTestUtility.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,8 @@ private static Task<string> AcquireTokenAsync(string authorityURL, string userID
311311

312312
public static bool IsKerberosTest => !string.IsNullOrEmpty(KerberosDomainUser) && !string.IsNullOrEmpty(KerberosDomainPassword);
313313

314+
public static bool IsNotKerberosTest => !IsKerberosTest;
315+
314316
#nullable enable
315317

316318
/// <summary>

src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/AsyncTest/AsyncCancelledConnectionsTest.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ public class AsyncCancelledConnectionsTest
2525
private Random _random;
2626

2727
// Disabled on Azure since this test fails on concurrent runs on same database.
28-
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureServer))]
28+
// Disabled on Kerberos and Managed Instance pipelines due to environment-specific instability.
29+
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup),
30+
nameof(DataTestUtility.IsNotAzureServer), nameof(DataTestUtility.IsNotManagedInstance),
31+
nameof(DataTestUtility.IsNotKerberosTest))]
2932
[InlineData(true)]
3033
[InlineData(false)]
3134
public async Task CancelAsyncConnections(bool useMars)

0 commit comments

Comments
 (0)