Skip to content

Commit a2988d3

Browse files
committed
- Fixed incorrect checks for runtime detection.
1 parent 196edf5 commit a2988d3

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

src/Microsoft.Data.SqlClient/tests/FunctionalTests/DataCommon/TestUtility.cs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,18 @@ namespace Microsoft.Data.SqlClient.Tests
99
public static class TestUtility
1010
{
1111
public static readonly bool IsNotArmProcess = RuntimeInformation.ProcessArchitecture != Architecture.Arm;
12-
public static bool IsNet => RuntimeInformation.FrameworkDescription == ".NET";
13-
public static bool IsNetCore => RuntimeInformation.FrameworkDescription == ".NET Core";
14-
public static bool IsNetFramework => RuntimeInformation.FrameworkDescription == ".NET Framework";
15-
public static bool IsNetNative => RuntimeInformation.FrameworkDescription == ".NET Native";
12+
public static bool IsNet
13+
{
14+
get
15+
{
16+
return
17+
!IsNetCore && !IsNetFramework && !IsNetNative &&
18+
RuntimeInformation.FrameworkDescription.StartsWith(".NET");
19+
}
20+
}
21+
22+
public static bool IsNetCore => RuntimeInformation.FrameworkDescription.StartsWith(".NET Core");
23+
public static bool IsNetFramework => RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework");
24+
public static bool IsNetNative => RuntimeInformation.FrameworkDescription.StartsWith(".NET Native");
1625
}
1726
}

src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectivityTests/AADConnectionTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public override async Task<SqlAuthenticationToken> AcquireTokenAsync(SqlAuthenti
3434
_ = parameters.ConnectionId;
3535

3636
var cts = new CancellationTokenSource();
37-
cts.CancelAfter(parameters.AuthenticationTimeout * 1000);
37+
cts.CancelAfter(parameters.ConnectionTimeout * 1000);
3838

3939
string[] scopes = new string[] { scope };
4040
SecureString password = new SecureString();

0 commit comments

Comments
 (0)