[CSHARP-3904] Protect xunit/logging infrastructure by DebuggerStepThrough Created: 14/Oct/21  Updated: 28/Oct/23  Resolved: 19/Nov/21

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 2.14.0

Type: Improvement Priority: Unknown
Reporter: Dmitry Lukyanov (Inactive) Assignee: Dmitry Lukyanov (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

In the current test implementation we can accidentally visit xunit/logging infrastructure in debugging, it's better to hide this logic via [DebuggerStepThrough] attribute.

We can also consider adding `Debugger.IsAttached` condition https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.debugger.isattached?view=net-5.0 to avoid throwing timeout exception in debugging



 Comments   
Comment by Githook User [ 19/Nov/21 ]

Author:

{'name': 'Dmitry Lukyanov', 'email': 'dmitry.lukyanov@mongodb.com', 'username': 'DmitryLukyanov'}

Message: CSHARP-3904: Protect xunit/logging infrastructure by DebuggerStepThrough. (#684)

CSHARP-3904: Protect xunit/logging infrastructure by DebuggerStepThrough.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/4201fe7ef2facbbcf96fb2c5af6c709aa15c08db

Generated at Wed Feb 07 21:46:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.