Skip to content

Conversation

@dennisdoomen
Copy link
Member

Solves #2619

@dennisdoomen dennisdoomen force-pushed the fix/tracing-concurrency branch from 7965d9c to 74b65e7 Compare June 29, 2025 07:30
@dennisdoomen dennisdoomen requested a review from Copilot June 29, 2025 07:30
Copy link

Copilot AI left a 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.

@dennisdoomen dennisdoomen force-pushed the fix/tracing-concurrency branch from 74b65e7 to 645df6d Compare June 29, 2025 07:35
@dennisdoomen dennisdoomen marked this pull request as ready for review June 29, 2025 07:35
@dennisdoomen dennisdoomen requested a review from jnyrup June 29, 2025 07:35
@github-actions
Copy link

github-actions bot commented Jun 29, 2025

Qodana for .NET

It 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
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

@dennisdoomen dennisdoomen removed the request for review from jnyrup June 29, 2025 07:58
@dennisdoomen dennisdoomen force-pushed the fix/tracing-concurrency branch from 645df6d to 017d4d7 Compare June 29, 2025 09:48
@coveralls
Copy link

coveralls commented Jun 29, 2025

Pull Request Test Coverage Report for Build 16028431685

Details

  • 5 of 5 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 97.309%

Totals Coverage Status
Change from base Build 15982317140: 0.001%
Covered Lines: 12545
Relevant Lines: 12745

💛 - Coveralls

@dennisdoomen dennisdoomen force-pushed the fix/tracing-concurrency branch 4 times, most recently from 93d7291 to e8df814 Compare June 29, 2025 17:26
@dennisdoomen dennisdoomen force-pushed the fix/tracing-concurrency branch 2 times, most recently from 6283f6d to 5f07848 Compare July 1, 2025 21:06
@dennisdoomen dennisdoomen requested a review from jnyrup July 1, 2025 21:06
@dennisdoomen dennisdoomen force-pushed the fix/tracing-concurrency branch from 5f07848 to 3b21037 Compare July 2, 2025 14:29
@dennisdoomen dennisdoomen requested a review from jnyrup July 2, 2025 14:29
@dennisdoomen dennisdoomen force-pushed the fix/tracing-concurrency branch from 3b21037 to 6e4adc3 Compare July 2, 2025 14:49
@dennisdoomen dennisdoomen merged commit 9678cd6 into fluentassertions:main Jul 2, 2025
8 checks passed
@dennisdoomen dennisdoomen deleted the fix/tracing-concurrency branch July 2, 2025 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants