Skip to content

Conversation

FrancescoV1985
Copy link
Contributor

Fixes: #7562

Motivation

Improve the test coverage of task containers on LocalRuntime

Solution

Added new tests for JoinSet, JoinMap, TaskTracer

@ADD-SP ADD-SP added A-tokio-util Area: The tokio-util crate C-maintenance Category: PRs that clean code up or issues documenting cleanup. A-tokio Area: The main tokio crate M-task Module: tokio/task labels Sep 15, 2025
@ADD-SP ADD-SP added the S-waiting-on-author Status: awaiting some action (such as code changes) from the PR or issue author. label Sep 15, 2025
@ADD-SP
Copy link
Member

ADD-SP commented Sep 25, 2025

Hi @FrancescoV1985 , any update on this PR?

@FrancescoV1985
Copy link
Contributor Author

FrancescoV1985 commented Sep 25, 2025

Hi @FrancescoV1985 , any update on this PR?
Hi @ADD-SP
I have updated the code (see pm on discord)

Copy link
Member

@ADD-SP ADD-SP left a comment

Choose a reason for hiding this comment

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

Could you try to reduce the duplicated code from test code? Also, Are the tests for TaskTracker in the scope of this PR?

@FrancescoV1985
Copy link
Contributor Author

FrancescoV1985 commented Sep 26, 2025

Could you try to reduce the duplicated code from test code? Also, Are the tests for TaskTracker in the scope of this PR?

I committed the tests for TaskTracker. I still need to add comments and double check. I will pm you for some clarifications..

Copy link
Member

@ADD-SP ADD-SP left a comment

Choose a reason for hiding this comment

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

Please sync changes from the base branch to fix the CI failures.

@ADD-SP ADD-SP removed the S-waiting-on-author Status: awaiting some action (such as code changes) from the PR or issue author. label Oct 8, 2025
@ADD-SP ADD-SP added the S-waiting-on-author Status: awaiting some action (such as code changes) from the PR or issue author. label Oct 8, 2025
Copy link
Member

@ADD-SP ADD-SP left a comment

Choose a reason for hiding this comment

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

Since the mod name has already indicated the scope, we can improve the test name, also change the comments.

Feel free to re-write the suggested changes.

Commit suggestions for task_join_set.rs

Co-authored-by: Qi <[email protected]>
@ADD-SP ADD-SP removed the S-waiting-on-author Status: awaiting some action (such as code changes) from the PR or issue author. label Oct 9, 2025
@ADD-SP ADD-SP added the S-waiting-on-author Status: awaiting some action (such as code changes) from the PR or issue author. label Oct 12, 2025
@ADD-SP ADD-SP removed the S-waiting-on-author Status: awaiting some action (such as code changes) from the PR or issue author. label Oct 15, 2025
Copy link
Member

@ADD-SP ADD-SP left a comment

Choose a reason for hiding this comment

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

Overall looks good to me, could you resolve the merge conflicts?

@ADD-SP ADD-SP changed the title Add new tests for JoinSet, JoinMap, TaskTracer and LocalRuntime task: add tests for spawn_local and spawn_local_on Oct 16, 2025
Copy link
Member

@ADD-SP ADD-SP left a comment

Choose a reason for hiding this comment

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

Thanks!

@ADD-SP ADD-SP merged commit 5dacc2e into tokio-rs:master Oct 16, 2025
87 checks passed
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 A-tokio-util Area: The tokio-util crate C-maintenance Category: PRs that clean code up or issues documenting cleanup. M-task Module: tokio/task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve the test coverage of task containers on LocalRuntime

2 participants