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

Improve the documentation for #[tokio::test] #4761

Merged
merged 4 commits into from
Jun 13, 2022

Conversation

Pyrromanis
Copy link
Contributor

Improved documentation for #[tokio::test] to mirror the #[tokio::main] one

Motivation

Fixing issue #4720

Solution

Mirrored the #[tokio::main] documentation + explained that each test gets a separate current-thread runtime.

Improve the documentation for #[tokio::test] to mirrot the #[tokio::main] one
@Darksonn Darksonn added T-docs Topic: documentation A-tokio-macros Area: The tokio-macros crate labels Jun 9, 2022
@Darksonn
Copy link
Contributor

Darksonn commented Jun 9, 2022

This is the third PR you've opened (#4760, #4759). Next time you change anything, please push another commit to the same PR instead of opening a new PR.

@Pyrromanis
Copy link
Contributor Author

Pyrromanis commented Jun 9, 2022

This is the third PR you've opened (#4760, #4759). Next time you change anything, please push another commit to the same PR instead of opening a new PR.

You are correct and I am very sorry. I just had to delete the first fork.

fixed a typo and fmt
Complete mirror of the #[tokio::main] one
/// }
/// ```
///
///Equivalent code not using `#[tokio::test]`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
///Equivalent code not using `#[tokio::test]`
/// Equivalent code not using `#[tokio::test]`

Fixed the formatting in some places
Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Darksonn Darksonn enabled auto-merge (squash) June 13, 2022 12:18
@Darksonn Darksonn merged commit 89000ca into tokio-rs:master Jun 13, 2022
@Pyrromanis Pyrromanis deleted the patch-1 branch June 13, 2022 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio-macros Area: The tokio-macros crate T-docs Topic: documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants