Skip to content

Add tests for Instant::now() and wasm32-unknown-unknown #7360

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

Open
Darksonn opened this issue May 24, 2025 · 0 comments
Open

Add tests for Instant::now() and wasm32-unknown-unknown #7360

Darksonn opened this issue May 24, 2025 · 0 comments
Labels
A-tokio Area: The main tokio crate C-maintenance Category: PRs that clean code up or issues documenting cleanup. E-help-wanted Call for participation: Help is requested to fix this issue. M-time Module: tokio/time T-wasm Topic: Web Assembly

Comments

@Darksonn
Copy link
Contributor

I would like us to add tests to avoid cases such as #7319 in the future. We should have tests for cases such as:

  • Create a runtime without feature="time" and run code should not panic.
  • Create a runtime with feature="time" and run code should not panic.
  • Create a runtime with feature="time" and call tokio::time::{sleep,timeout} should panic.

Probably also some tests for what happens when you access time-based metrics. Should that panic? It doesn't right now - it just returns 0, but it probably should.

@Darksonn Darksonn added E-help-wanted Call for participation: Help is requested to fix this issue. C-maintenance Category: PRs that clean code up or issues documenting cleanup. A-tokio Area: The main tokio crate M-time Module: tokio/time T-wasm Topic: Web Assembly labels May 24, 2025
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. E-help-wanted Call for participation: Help is requested to fix this issue. M-time Module: tokio/time T-wasm Topic: Web Assembly
Projects
None yet
Development

No branches or pull requests

1 participant