mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-03 01:16:14 +03:00
Rollup merge of #38013 - wezm:simplify-test-notes, r=steveklabnik
Simplify notes on testing and concurrency The start of the notes on tests running concurrently, added in https://github.com/rust-lang/rust/pull/37766 read a little awkwardly. This PR fixes that and simplifies the wording a bit. r? @steveklabnik
This commit is contained in:
@@ -589,11 +589,10 @@ please see the [Documentation chapter](documentation.html).
|
||||
|
||||
# Testing and concurrency
|
||||
|
||||
One thing that is important to note when writing tests is that they may be run
|
||||
concurrently using threads. For this reason you should take care that your tests
|
||||
are written in such a way as to not depend on each-other, or on any shared
|
||||
state. "Shared state" can also include the environment, such as the current
|
||||
working directory, or environment variables.
|
||||
It is important to note that tests are run concurrently using threads. For this
|
||||
reason, care should be taken to ensure your tests do not depend on each-other,
|
||||
or on any shared state. "Shared state" can also include the environment, such
|
||||
as the current working directory, or environment variables.
|
||||
|
||||
If this is an issue it is possible to control this concurrency, either by
|
||||
setting the environment variable `RUST_TEST_THREADS`, or by passing the argument
|
||||
|
||||
Reference in New Issue
Block a user