-
Notifications
You must be signed in to change notification settings - Fork 292
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert default value of UseMinimumLoginTimeout context switch to 'tru…
…e' (#2419) * add test for bug * change default value of UseMinimumLoginTimeout back to 'true' * Update src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/LocalAppContextSwitches.cs --------- Co-authored-by: Cheena Malhotra <13396919+cheenamalhotra@users.noreply.github.com>
- Loading branch information
1 parent
22ac587
commit 3fe496c
Showing
3 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/Microsoft.Data.SqlClient/tests/FunctionalTests/LocalAppContextSwitchesTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System.Reflection; | ||
using Xunit; | ||
|
||
namespace Microsoft.Data.SqlClient.Tests | ||
{ | ||
public class LocalAppContextSwitchesTests | ||
{ | ||
[Theory] | ||
[InlineData("SuppressInsecureTLSWarning", false)] | ||
[InlineData("LegacyRowVersionNullBehavior", false)] | ||
[InlineData("MakeReadAsyncBlocking", false)] | ||
[InlineData("UseMinimumLoginTimeout", true)] | ||
public void DefaultSwitchValue(string property, bool expectedDefaultValue) | ||
{ | ||
var switchesType = typeof(SqlCommand).Assembly.GetType("Microsoft.Data.SqlClient.LocalAppContextSwitches"); | ||
|
||
var switchValue = (bool)switchesType.GetProperty(property, BindingFlags.Public | BindingFlags.Static).GetValue(null); | ||
|
||
Assert.Equal(expectedDefaultValue, switchValue); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters