Skip to content

Conversation

brah-mcdude
Copy link
Contributor

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

Copy link
Contributor

@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.

LGTM

@Arkatufus Arkatufus enabled auto-merge (squash) February 10, 2022 16:17
Copy link
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.

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

Copy link
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 enabled auto-merge (squash) February 10, 2022 21:01
@Aaronontheweb Aaronontheweb merged commit c24a3a6 into akkadotnet:dev Feb 10, 2022
@brah-mcdude brah-mcdude deleted the InterceptAsync_detached_func_5586 branch February 10, 2022 23:02
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.

3 participants