summary refs log tree commit diff
diff options
context:
space:
mode:
authorAshish Kumar <ashfame@users.noreply.github.com>2022-09-28 16:44:35 +0530
committerGitHub <noreply@github.com>2022-09-28 11:14:35 +0000
commit5c429b86b4cf1d2ccf81339844599c85653521df (patch)
treedd3dec3420d5730ed0147bc4d59933f9cc8fdee0
parentPersist CreateRoom events to DB in a batch (#13800) (diff)
downloadsynapse-5c429b86b4cf1d2ccf81339844599c85653521df.tar.xz
Add instruction for running unit tests in parallel (#13928)
-rw-r--r--changelog.d/13928.doc1
-rw-r--r--docs/development/contributing_guide.md6
2 files changed, 7 insertions, 0 deletions
diff --git a/changelog.d/13928.doc b/changelog.d/13928.doc
new file mode 100644
index 0000000000..04cd06f19d
--- /dev/null
+++ b/changelog.d/13928.doc
@@ -0,0 +1 @@
+Add instruction to contributing guide for running unit tests in parallel. Contributed by @ashfame.
diff --git a/docs/development/contributing_guide.md b/docs/development/contributing_guide.md
index cb0d727efa..5c37225168 100644
--- a/docs/development/contributing_guide.md
+++ b/docs/development/contributing_guide.md
@@ -167,6 +167,12 @@ was broken. They are slower than the linters but will typically catch more error
 poetry run trial tests
 ```
 
+You can run unit tests in parallel by specifying `-jX` argument to `trial` where `X` is the number of parallel runners you want. To use 4 cpu cores, you would run them like:
+
+```sh
+poetry run trial -j4 tests
+```
+
 If you wish to only run *some* unit tests, you may specify
 another module instead of `tests` - or a test class or a method: