Skip to content

Introduce app context switch for setting MSF=true by default - #3841

Merged
apoorvdeshmukh merged 3 commits into
mainfrom
dev/ad/acs-msf
Dec 12, 2025
Merged

Introduce app context switch for setting MSF=true by default#3841
apoorvdeshmukh merged 3 commits into
mainfrom
dev/ad/acs-msf

Address review comments

42ffb7f
Select commit
Loading
Failed to load commit list.
Azure Pipelines / PR-SqlClient-Project succeeded Dec 12, 2025 in 1h 7m 33s

Build #34511 had test failures

Details

Tests

  • Failed: 13 (0.01%)
  • Passed: 190,834 (96.55%)
  • Other: 6,811 (3.45%)
  • Total: 197,658

Annotations

Check failure on line 0 in EXEC

See this annotation in the file changed.

@azure-pipelines azure-pipelines / PR-SqlClient-Project

EXEC#L0

EXEC(0,0): Error Message: 

Check failure on line 0 in EXEC

See this annotation in the file changed.

@azure-pipelines azure-pipelines / PR-SqlClient-Project

EXEC#L0

EXEC(0,0): Error Message: 

Check failure on line 337 in build.proj

See this annotation in the file changed.

@azure-pipelines azure-pipelines / PR-SqlClient-Project

build.proj#L337

build.proj(337,5): Error MSB3073: The command "         dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj"         --no-build         -v n         -p:Configuration=Debug         -p:TargetnetcoreVersion=net9.0         -p:ReferenceType=Project         -p:TestSet=3         -p:TestTargetOS=Windowsnetcoreapp         --collect "Code coverage"         --results-directory TestResults         --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests"         --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3"       " exited with code 1.

Check failure on line 803 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / PR-SqlClient-Project

Build log #L803

Process 'msbuild.exe' exited with code '1'.

Check failure on line 1 in Microsoft.Data.SqlClient.UnitTests.LocalAppContextSwitchesTest.TestDefaultAppContextSwitchValues

See this annotation in the file changed.

@azure-pipelines azure-pipelines / PR-SqlClient-Project

Microsoft.Data.SqlClient.UnitTests.LocalAppContextSwitchesTest.TestDefaultAppContextSwitchValues

Assert.False() Failure
Expected: False
Actual:   True
Raw output
   at Microsoft.Data.SqlClient.UnitTests.LocalAppContextSwitchesTest.TestDefaultAppContextSwitchValues() in /_/src/Microsoft.Data.SqlClient/tests/UnitTests/Microsoft/Data/SqlClient/LocalAppContextSwitchesTest.cs:line 30
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

Check failure on line 1 in Microsoft.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_NP

See this annotation in the file changed.

@azure-pipelines azure-pipelines / PR-SqlClient-Project

Microsoft.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_NP

Assert.Throws() Failure: No exception was thrown
Expected: typeof(System.AggregateException)
Raw output
   at Microsoft.Data.SqlClient.ManualTesting.Tests.DataTestUtility.AssertThrowsWrapper[TException](Action actionThatFails, String exceptionMessage, Boolean innerExceptionMustBeNull, Func`2 customExceptionVerifier) in /_/src/Microsoft.Data.SqlClient/tests/ManualTests/DataCommon/DataTestUtility.cs:line 951
   at Microsoft.Data.SqlClient.ManualTesting.Tests.DataTestUtility.AssertThrowsWrapper[TException,TInnerException](Action actionThatFails, String exceptionMessage, String innerExceptionMessage, Boolean innerExceptionMustBeNull, Func`2 customExceptionVerifier) in /_/src/Microsoft.Data.SqlClient/tests/ManualTests/DataCommon/DataTestUtility.cs:line 973
   at Microsoft.Data.SqlClient.ManualTesting.Tests.DataStreamTest.GetStream(String connectionString) in /_/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/DataStreamTest/DataStreamTest.cs:line 1319
   at Microsoft.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer(String connectionString, Boolean usingNamePipes) in /_/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/DataStreamTest/DataStreamTest.cs:line 185
   at Microsoft.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_NP() in /_/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/DataStreamTest/DataStreamTest.cs:line 41
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

Check failure on line 1 in Microsoft.Data.SqlClient.ManualTesting.Tests.XEventsTracingTest.XEventActivityIDConsistentWithTracing(query: "SELECT @@VERSION", commandType: Text, xEvent: "sql_statement_starting")

See this annotation in the file changed.

@azure-pipelines azure-pipelines / PR-SqlClient-Project

Microsoft.Data.SqlClient.ManualTesting.Tests.XEventsTracingTest.XEventActivityIDConsistentWithTracing(query: "SELECT @@VERSION", commandType: Text, xEvent: "sql_statement_starting")

Microsoft.Data.SqlClient.SqlException : Operation failed. Operation will cause database event session memory to exceed allowed limit. Event session memory may be released by stopping active sessions or altering session memory options. Check sys.dm_xe_database_sessions for active sessions that can be stopped or altered.
Raw output
   at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) in /_/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnection.cs:line 2485
   at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) in /_/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlInternalConnection.cs:line 597
   at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, SqlCommand command, Boolean callerHasConnectionLock, Boolean asyncClose) in /_/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParser.cs:line 1724
   at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) in /_/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParser.cs:line 3124
   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean isAsync, Int32 timeout, Boolean asyncWrite) in /_/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommand.NonQuery.cs:line 819
   at Microsoft.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean isRetry, String methodName) in /_/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommand.NonQuery.cs:line 588
   at Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQuery() in /_/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommand.NonQuery.cs:line 116
   at Microsoft.Data.SqlClient.ManualTesting.Tests.DataTestUtility.XEventScope..ctor(String sessionName, SqlConnection connection, String eventSpecification, String targetSpecification, UInt16 durationInMinutes) in /_/src/Microsoft.Data.SqlClient/tests/ManualTests/DataCommon/DataTestUtility.cs:line 1400
   at Microsoft.Data.SqlClient.ManualTesting.Tests.XEventsTracingTest.XEventActivityIDConsistentWithTracing(String query, CommandType commandType, String xEvent) in /_/src/Microsoft.Data.SqlClient/tests/ManualTests/TracingTests/XEventsTracingTest.cs:line 43
   at InvokeStub_XEventsTracingTest.XEventActivityIDConsistentWithTracing(Object, Span`1)
   at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

Check failure on line 1 in Microsoft.Data.SqlClient.ManualTesting.Tests.XEventsTracingTest.XEventActivityIDConsistentWithTracing(query: "sp_help", commandType: StoredProcedure, xEvent: "rpc_starting")

See this annotation in the file changed.

@azure-pipelines azure-pipelines / PR-SqlClient-Project

Microsoft.Data.SqlClient.ManualTesting.Tests.XEventsTracingTest.XEventActivityIDConsistentWithTracing(query: "sp_help", commandType: StoredProcedure, xEvent: "rpc_starting")

Microsoft.Data.SqlClient.SqlException : Transaction (Process ID 1531) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
Raw output
   at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) in /_/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnection.cs:line 2485
   at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) in /_/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlInternalConnection.cs:line 597
   at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, SqlCommand command, Boolean callerHasConnectionLock, Boolean asyncClose) in /_/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParser.cs:line 1724
   at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) in /_/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParser.cs:line 3124
   at Microsoft.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows) in /_/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDataReader.cs:line 3399
   at Microsoft.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more) in /_/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDataReader.cs:line 3698
   at Microsoft.Data.SqlClient.SqlDataReader.Read() in /_/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDataReader.cs:line 3651
   at Microsoft.Data.SqlClient.ManualTesting.Tests.XEventsTracingTest.XEventActivityIDConsistentWithTracing(String query, CommandType commandType, String xEvent) in /_/src/Microsoft.Data.SqlClient/tests/ManualTests/TracingTests/XEventsTracingTest.cs:line 54
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)