Skip to content

Commit 685027a

Browse files
authored
Rollup merge of rust-lang#38013 - wezm:simplify-test-notes, r=steveklabnik
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
2 parents 639568c + 517fce0 commit 685027a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/doc/book/testing.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -589,11 +589,10 @@ please see the [Documentation chapter](documentation.html).
589589

590590
# Testing and concurrency
591591

592-
One thing that is important to note when writing tests is that they may be run
593-
concurrently using threads. For this reason you should take care that your tests
594-
are written in such a way as to not depend on each-other, or on any shared
595-
state. "Shared state" can also include the environment, such as the current
596-
working directory, or environment variables.
592+
It is important to note that tests are run concurrently using threads. For this
593+
reason, care should be taken to ensure your tests do not depend on each-other,
594+
or on any shared state. "Shared state" can also include the environment, such
595+
as the current working directory, or environment variables.
597596

598597
If this is an issue it is possible to control this concurrency, either by
599598
setting the environment variable `RUST_TEST_THREADS`, or by passing the argument

0 commit comments

Comments
 (0)