Skip to content

Commit 4a4bd9d

Browse files
Disable Async cancellation tests on Kerberos/Managed Instance pipelines (dotnet#4311)
1 parent 50ed7c7 commit 4a4bd9d

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
@@ -387,6 +387,8 @@ private static Task<string> AcquireTokenAsync(string authorityURL, string userID
387387

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

390+
public static bool IsNotKerberosTest => !IsKerberosTest;
391+
390392
#nullable enable
391393

392394
/// <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)