Skip to content

Commit 8cb5913

Browse files
Tests | Skip unsupported platform x86 test and bump up Microsoft.NET.Test.Sdk version (#1890)
1 parent 080e9e6 commit 8cb5913

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/TransactionTest/DistributedTransactionTest.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5+
using System;
56
using System.Threading.Tasks;
67
using System.Transactions;
78
using Xunit;
@@ -13,7 +14,9 @@ namespace Microsoft.Data.SqlClient.ManualTesting.Tests
1314
[PlatformSpecific(TestPlatforms.Windows)]
1415
public class DistributedTransactionTest
1516
{
16-
[ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureServer), Timeout = 10000)]
17+
private static bool s_DelegatedTransactionCondition => DataTestUtility.AreConnStringsSetup() && DataTestUtility.IsNotAzureServer() && PlatformDetection.IsNotX86Process;
18+
19+
[ConditionalFact(nameof(s_DelegatedTransactionCondition), Timeout = 10000)]
1720
public async Task Delegated_transaction_deadlock_in_SinglePhaseCommit()
1821
{
1922
TransactionManager.ImplicitDistributedTransactions = true;

src/Microsoft.Data.SqlClient/tests/tools/Microsoft.DotNet.XUnitExtensions/Extensions/PlatformDetection.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@ public static partial class PlatformDetection
1010
{
1111
public static bool IsArmProcess => RuntimeInformation.ProcessArchitecture == Architecture.Arm;
1212
public static bool IsNotArmProcess => !IsArmProcess;
13+
public static bool IsX86Process => RuntimeInformation.ProcessArchitecture == Architecture.X86;
14+
public static bool IsNotX86Process => !IsX86Process;
1315
}
1416
}

tools/props/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
<PropertyGroup>
6161
<MicrosoftDotNetPlatformAbstractionsVersion>3.1.6</MicrosoftDotNetPlatformAbstractionsVersion>
6262
<MicrosoftIdentityModelClientsActiveDirectoryVersion>5.2.9</MicrosoftIdentityModelClientsActiveDirectoryVersion>
63-
<MicrosoftNETTestSdkVersion>17.3.2</MicrosoftNETTestSdkVersion>
63+
<MicrosoftNETTestSdkVersion>17.4.1</MicrosoftNETTestSdkVersion>
6464
<NewtonsoftJsonVersion>13.0.1</NewtonsoftJsonVersion>
6565
<SystemRuntimeInteropServicesRuntimeInformationVersion>4.3.0</SystemRuntimeInteropServicesRuntimeInformationVersion>
6666
<SystemDataOdbcVersion>6.0.1</SystemDataOdbcVersion>

0 commit comments

Comments
 (0)