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

Fix: swallowed exceptions in timed out WithCircuitBreaker() #7362

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

Arkatufus
Copy link
Contributor

Fixes #7358

Changes

  • Modernize unit tests
  • Add unit test

Copy link
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 for unit test

Comment on lines 259 to 266
// Issue https://github.com/akkadotnet/akka.net/issues/7358
// The actual exception is thrown out-of-band with no handler because inner Task is detached
// after a timeout and NOT protected

// In the bug, the task is still running when it should've been stopped.
innerFuture.IsCompleted.Should().BeTrue();
innerFuture.IsFaulted.Should().BeTrue();
innerFuture.Exception.Should().BeOfType<TestException>();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The actual test, the inner Task should have stopped when the circuit breaker timed out, but it is still running as a detached Task.

Arkatufus

This comment was marked as outdated.

@Arkatufus Arkatufus marked this pull request as ready for review October 21, 2024 20:51
Arkatufus

This comment was marked as outdated.

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

Successfully merging this pull request may close these issues.

Akka Persistence Throwing Unobserved Task Exception
1 participant