Skip to content

Commit 0988f1b

Browse files
committed
Fix xevent test failures, avoid orphaned sessions (#3775)
- Added IsNotManagedInstance() for XEvents tests.
1 parent 9c8a7dd commit 0988f1b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,8 @@ public static bool IsEnclaveAzureDatabaseSetup()
470470

471471
public static bool IsNotAzureSynapse() => !IsAzureSynapse;
472472

473+
public static bool IsNotManagedInstance() => !IsManagedInstance;
474+
473475
// Synapse: UDT Test Database not compatible with Azure Synapse.
474476
public static bool IsUdtTestDatabasePresent() => IsDatabasePresent(UdtTestDbName) && IsNotAzureSynapse();
475477

@@ -1291,7 +1293,7 @@ protected virtual void OnMatchingEventWritten(EventWrittenEventArgs eventData)
12911293

12921294
#nullable enable
12931295

1294-
public readonly ref struct XEventScope : IDisposable
1296+
public readonly ref struct XEventScope // IDisposable
12951297
{
12961298
#region Private Fields
12971299

0 commit comments

Comments
 (0)