Rollup merge of #38112 - tarka:book-testing-fix, r=steveklabnik
Minor fix to testing concurrency section
This commit is contained in:
commit
3231641f44
|
@ -589,11 +589,11 @@ please see the [Documentation chapter](documentation.html).
|
||||||
|
|
||||||
# Testing and concurrency
|
# Testing and concurrency
|
||||||
|
|
||||||
One thing that is important to note when writing tests are run concurrently
|
One thing that is important to note when writing tests is that they may be run
|
||||||
using threads. For this reason you should take care that your tests are written
|
concurrently using threads. For this reason you should take care that your tests
|
||||||
in such a way as to not depend on each-other, or on any shared state. "Shared
|
are written in such a way as to not depend on each-other, or on any shared
|
||||||
state" can also include the environment, such as the current working directory,
|
state. "Shared state" can also include the environment, such as the current
|
||||||
or environment variables.
|
working directory, or environment variables.
|
||||||
|
|
||||||
If this is an issue it is possible to control this concurrency, either by
|
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
|
setting the environment variable `RUST_TEST_THREADS`, or by passing the argument
|
||||||
|
|
Loading…
Reference in New Issue