-
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
Intercept async detached func 5586 #5588
Intercept async detached func 5586 #5588
Conversation
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
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.
Need to add a method overload rather than introducing a new optional parameter, per https://getakka.net/community/contributing/api-changes-compatibility.html cc @Arkatufus
…cdude/akka.net into InterceptAsync_detached_func_5586
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
Fixes issue #5586
A brief description of the changes:
The issue is similar to a previous issue (#5537). Here too, the callback ("func" in this case) is not getting awaited.
I modified an interface by adding an optional timeout parameter.
This way, I am forcing the compiler to call the "correct" ExpectAsync version that does await func.
I also modified the interface implementation to reflect the change in the interface.
I left notes for users to see that it is still possible to call ExpectAsync and have func not get awaited.
@Aaronontheweb - you tell me what you think. Obviously, this it not optimal.
I wrote a test to reproduce the issue.
This test failed as expected.
In other words: The issue was getting reproduced as expected.
Then, I fixed the issue.
And then I saw that the test passes as expected.
Compatibility:
[I think so] This change follows the [Akka.NET API Compatibility Guidelines]
[Yes] I have reviewed my own pull request.
[Change in Akka.TestKit Interface change - not reviewed] Changes in public API reviewed, if any.
Included data from after this change here:
Output from visual studio tests:
Akka.TestKit.Tests (net6.0)
Tests in group: 255
Total Duration: 57.2 sec
Outcomes
254 Passed
1 Skipped