Reduce Mutex test runs (#9345)

Some tests take a long time on CI:

* `--- PASS: TestRWMutex (226.49s)`
* ` --- PASS: TestRWMutex (7.13s)`

Reduce the number of runs.

Before/after locally:

```
--- PASS: TestRWMutex (20.95s)
--- PASS: TestRWMutex (7.13s)

--- PASS: TestMutex (3.01s)
--- PASS: TestMutex (1.65s)
```
This commit is contained in:
Klaus Post
2020-04-15 03:39:03 +02:00
committed by GitHub
parent f19cbfad5c
commit 6a8298b137
2 changed files with 6 additions and 2 deletions

View File

@@ -240,7 +240,7 @@ func HammerRWMutex(gomaxprocs, numReaders, numIterations int) {
// Borrowed from rwmutex_test.go
func TestRWMutex(t *testing.T) {
defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(-1))
n := 1000
n := 100
if testing.Short() {
n = 5
}