-
-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(subscriber): test with custom
self_wake()
function
Part of the testing performed in the `console-subscriber` integration tests is detecting self wakes. This relied upon the `yield_now()` from Tokio. However, the behavior of this function was changed in tokio-rs/tokio#5223 and since Tokio 1.23 the wake doesn't occur in the task that `yield_now()` is called from. This breaks the test when using a newer version of Tokio. This change replaces the use of `yield_now()` with a custom `self_wake()` function that returns a future which does perform a self wake (wakes the task from within itself before returning `Poll::Pending`). The same custom `self_wake()` is also included in the `app` example so that it shows self wakes correctly. Tokio has been updated to 1.28.2 in the lock file (the last with compatible MSRV) so that this fix is tested. Ref #512
- Loading branch information
Showing
5 changed files
with
82 additions
and
16 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters