Skip to content
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

Akka.API.Tests.DefaultLogFormatSpec.ShouldUseDefaultLogFormat: racy failures #7421

Closed
Aaronontheweb opened this issue Dec 19, 2024 · 0 comments · Fixed by #7429
Closed

Akka.API.Tests.DefaultLogFormatSpec.ShouldUseDefaultLogFormat: racy failures #7421

Aaronontheweb opened this issue Dec 19, 2024 · 0 comments · Fixed by #7429

Comments

@Aaronontheweb
Copy link
Member

VerifyException : Directory: /home/vsts/work/1/s/src/core/Akka.API.Tests/verify
NotEqual:
  - Received: DefaultLogFormatSpec.ShouldUseDefaultLogFormat.DotNet8_0.received.txt
    Verified: DefaultLogFormatSpec.ShouldUseDefaultLogFormat.DotNet.verified.txt

FileContent:

NotEqual:

Received: DefaultLogFormatSpec.ShouldUseDefaultLogFormat.DotNet8_0.received.txt
Verified: DefaultLogFormatSpec.ShouldUseDefaultLogFormat.DotNet.verified.txt
Compare Result:
+ [DEBUG][DateTime][Thread 0001][EventStream(test)] Logger log1-TestEventListener [Akka.TestKit.TestEventListener] started
  [DEBUG][DateTime][Thread 0001][ActorSystem(test)] This is a test 1 cheese
  [INFO][DateTime][Thread 0001][ActorSystem(test)] This is a test 1
  [WARNING][DateTime][Thread 0001][ActorSystem(test)] This is a test 1
  [ERROR][DateTime][Thread 0001][ActorSystem(test)] This is a test 1

The problem with this spec is that SOMETIMES [DEBUG][DateTime][Thread 0001][EventStream(test)] Logger log1-TestEventListener [Akka.TestKit.TestEventListener] started gets included, other times it doesn't - this is a minor race condition where the xUnit logger sometimes does / does not get added before the TestKit event listener gets added.

We should fix this by having Verify scrub that line for this spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant