-
Notifications
You must be signed in to change notification settings - Fork 731
Ensured WithTracing is safe when used with BeEquivalentTo globally #3067
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensured WithTracing is safe when used with BeEquivalentTo globally #3067
Conversation
7965d9c to
74b65e7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR ensures that WithTracing is safe when used with BeEquivalentTo globally. It updates the release notes, adds a test to validate concurrent tracing behavior, and refactors the trace writer to be thread safe by using AsyncLocal.
- Updated release notes to include version 8.5.0 and related fixes/enhancements.
- Added a concurrent execution test in TracingSpecs to validate tracing safety.
- Refactored StringBuilderTraceWriter to use AsyncLocal for thread safety.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docs/_pages/releases.md | Updated release notes with version 8.5.0 fixes and enhancements. |
| Tests/FluentAssertions.Equivalency.Specs/TracingSpecs.cs | Added a new test to ensure WithTracing works safely under concurrent conditions. |
| Src/FluentAssertions/Equivalency/Tracing/StringBuilderTraceWriter.cs | Refactored thread unsafe code by replacing direct state management with AsyncLocal. |
Src/FluentAssertions/Equivalency/Tracing/StringBuilderTraceWriter.cs
Outdated
Show resolved
Hide resolved
74b65e7 to
645df6d
Compare
Qodana for .NETIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked Contact Qodana teamContact us at qodana-support@jetbrains.com
|
645df6d to
017d4d7
Compare
Pull Request Test Coverage Report for Build 16028431685Details
💛 - Coveralls |
Src/FluentAssertions/Equivalency/Tracing/StringBuilderTraceWriter.cs
Outdated
Show resolved
Hide resolved
Src/FluentAssertions/Equivalency/Tracing/StringBuilderTraceWriter.cs
Outdated
Show resolved
Hide resolved
Src/FluentAssertions/Equivalency/Tracing/StringBuilderTraceWriter.cs
Outdated
Show resolved
Hide resolved
93d7291 to
e8df814
Compare
Src/FluentAssertions/Equivalency/EquivalencyValidationContext.cs
Outdated
Show resolved
Hide resolved
6283f6d to
5f07848
Compare
5f07848 to
3b21037
Compare
3b21037 to
6e4adc3
Compare
Solves #2619