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

add test for regression with shutdown_timeout 0 #3196

Merged
merged 1 commit into from
Nov 29, 2020

Conversation

kykosic
Copy link
Contributor

@kykosic kykosic commented Nov 29, 2020

Motivation

Solves issue #3193

Added a regression test to make sure that Runtime::shutdown_timeout with Duration::from_nanos(0) instantly shuts down instead of waiting forever for all tasks.

Solution

Spawn a task that sleeps for 10k seconds, then time the call to shutdown_timeout with a zero duration. Assert that actual time to shutdown should be <1 second.

@Darksonn Darksonn added A-tokio Area: The main tokio crate C-maintenance Category: PRs that clean code up or issues documenting cleanup. M-runtime Module: tokio/runtime labels Nov 29, 2020
@Darksonn
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate C-maintenance Category: PRs that clean code up or issues documenting cleanup. M-runtime Module: tokio/runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants