-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fixed QueueSource PostStop and added a missing test case #4991
Conversation
@@ -153,7 +153,7 @@ public void QueueSink_should_timeout_future_when_stream_cannot_provide_data() | |||
}, _materializer); | |||
} | |||
|
|||
[Fact(Skip = "Racy, see https://github.com/akkadotnet/akka.net/pull/4424#issuecomment-632284459")] | |||
[Fact] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's see if this was fixed too
t.Exception.InnerException.Should().BeOfType<IllegalStateException>(); | ||
}, TaskContinuationOptions.OnlyOnFaulted).Wait(); | ||
var exception = Record.ExceptionAsync(async () => await queue.PullAsync()).Result; | ||
exception.Should().BeOfType<StreamDetachedException>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using XUnit API to catch the exception and unwrap. Also, this should always run, not just on OnlyOnFaulted
, to make sure we catch regressions.
…on when stream already completed
331cd3a
to
437a9b4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Ports #23151 and #23509