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
Monitor OccurredEvents ordering #1728
Comments
I managed to reproduce this issue only on .NET Framework. The "culprit", so to speak, is the precision of fluentassertions/Src/FluentAssertions/Events/EventMonitor.cs Lines 46 to 56 in b8d6ac2
This wrong behavior might still happen on .NET Core onwards given a lot of method calls but is rarer due to dotnet/coreclr#9736. I'm not sure what an elegant solution might look like. Let me know what you think. |
Thank you for digging into this. I think what you're suggesting is one way of doing it. Another might be a thread-safe counter owned by the |
Description
Monitor
OccurredEvents
ordering seems to be random and does not reflect the order in which events were raised.Complete minimal example reproducing the issue
Expected behavior:
OccurredEvents
ordering should be the same as the raised eventsActual behavior:
OccurredEvents
ordering is random, and changes with every runVersions
I'm using FluentAssertions 5.6.0.
.NET Framework version 4.8.
The text was updated successfully, but these errors were encountered: