Skip to content

Fix broken xUnit 3 explicit sender (IAsyncLifetime)#8145

Merged
Aaronontheweb merged 3 commits into
akkadotnet:devfrom
Arkatufus:#8144-broken-implicit-sender
Apr 9, 2026
Merged

Fix broken xUnit 3 explicit sender (IAsyncLifetime)#8145
Aaronontheweb merged 3 commits into
akkadotnet:devfrom
Arkatufus:#8144-broken-implicit-sender

Conversation

@Arkatufus
Copy link
Copy Markdown
Contributor

@Arkatufus Arkatufus commented Apr 1, 2026

Fixes #8144

Changes

  • Add reproduction code
  • Add fix

@Arkatufus Arkatufus marked this pull request as draft April 1, 2026 19:55
@Arkatufus Arkatufus marked this pull request as ready for review April 2, 2026 11:21
@Arkatufus Arkatufus changed the title Add reproduction test for #8144 Fix broken xUnit 3 explicit sender (IAsyncLifetime) Apr 2, 2026
Copy link
Copy Markdown
Contributor Author

@Arkatufus Arkatufus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review

{
get
{
EnsureImplicitSender();
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actual fix, need to make sure that implicit sender is set every time.
This is a similar fix to what we have in Akka.Hosting.TestKit.

{
get
{
EnsureImplicitSender();
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actual fix, need to make sure that implicit sender is set every time.
This is a similar fix to what we have in Akka.Hosting.TestKit.

@Aaronontheweb Aaronontheweb added the akka-testkit Akka.NET Testkit issues label Apr 9, 2026
Copy link
Copy Markdown
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Aaronontheweb Aaronontheweb merged commit ba0d191 into akkadotnet:dev Apr 9, 2026
12 checks passed
Aaronontheweb added a commit to Aaronontheweb/akka.net that referenced this pull request Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

akka-testkit Akka.NET Testkit issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TestKit implicit sender broken with xUnit v3 IAsyncLifetime due to [ThreadStatic] usage

2 participants