Skip to content

Commit

Permalink
Skip on non-supported targets
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmarbach committed Sep 20, 2023
1 parent 052d1f7 commit 0469097
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,17 @@ public static bool IsTargetReadyForAeWithKeyStore()
;
}

public static bool IsSupportingDistributedTransactions()
{
#if NET7_0_OR_GREATER
return OperatingSystem.IsWindows() && IsNotAzureServer();
#elif NETFRAMEWORK
return System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Windows) && IsNotAzureServer();
#else
return false;
#endif
}

public static bool IsUsingManagedSNI() => UseManagedSNIOnWindows;

public static bool IsNotUsingManagedSNIOnWindows() => !UseManagedSNIOnWindows;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static void TestManualEnlistment_Enlist_TxScopeComplete()
RunTestSet(TestCase_ManualEnlistment_Enlist_TxScopeComplete);
}

[ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureServer))]
[ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsSupportingDistributedTransactions))]
public static void TestEnlistmentPrepare_TxScopeComplete()
{
Assert.Throws<TransactionAbortedException>( () =>
Expand Down

0 comments on commit 0469097

Please sign in to comment.