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 sections about testing concurrency and stdout/err capture #37766

Merged
merged 3 commits into from
Nov 17, 2016
Merged

Add sections about testing concurrency and stdout/err capture #37766

merged 3 commits into from
Nov 17, 2016

Conversation

tarka
Copy link
Contributor

@tarka tarka commented Nov 14, 2016

No description provided.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @steveklabnik (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

Copy link
Member

@steveklabnik steveklabnik left a comment

Choose a reason for hiding this comment

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

Thanks for this! Needs one minor change.


One thing that is important to note when writing tests are run concurrently
using threads (by default the number of threads is equal to the number of CPUs
on the machine). For this reason you should take care that your tests are
Copy link
Member

Choose a reason for hiding this comment

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

Could you remove this? It's not exactly true ish, and it's not something we guarantee.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The concurrency/threading in testing bit? I understand that it may be platform dependant, but I think it's important to point this out or you can spend some time debugging race conditions in your tests. Can you suggest a more accurate version?

Copy link
Member

@steveklabnik steveklabnik Nov 14, 2016

Choose a reason for hiding this comment

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

the parenthetical about CPU counts, sorry 😄 i should have been more specific.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh, makes sense. Done :)

@steveklabnik
Copy link
Member

@bors: r+ rollup

thank you!

@bors
Copy link
Contributor

bors commented Nov 14, 2016

📌 Commit 5a76fe4 has been approved by steveklabnik

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 17, 2016
…ure, r=steveklabnik

Add sections about testing concurrency and stdout/err capture
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 17, 2016
…ure, r=steveklabnik

Add sections about testing concurrency and stdout/err capture
bors added a commit that referenced this pull request Nov 17, 2016
Rollup of 8 pull requests

- Successful merges: #37752, #37757, #37759, #37766, #37772, #37799, #37806, #37821
- Failed merges: #37442
@bors bors merged commit 5a76fe4 into rust-lang:master Nov 17, 2016

# Testing and concurrency

One thing that is important to note when writing tests are run concurrently
Copy link
Contributor

Choose a reason for hiding this comment

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

You seem to be missing something in this sentence.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, will fix.

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Dec 24, 2016
…abnik

Simplify notes on testing and concurrency

The start of the notes on tests running concurrently, added in rust-lang#37766 read a little awkwardly. This PR fixes that and simplifies the wording a bit.

r? @steveklabnik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants