diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2016-11-04 03:23:37 +0000 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2016-11-04 04:28:10 +0000 |
| commit | cd670a61c193e6717400c6cc130484d6ad97c96b (patch) | |
| tree | 77b18f448ae2e3283e962a37bbc280f0074701dc /src/encoding/json/encode_test.go | |
| parent | 9f5859759eccebb5d0e9d3ef4de1db41d66b41ac (diff) | |
| download | go-cd670a61c193e6717400c6cc130484d6ad97c96b.tar.xz | |
net/http: speed up tests, use t.Parallel when it's safe
Before: 8.9 seconds for go test -short
After: 2.8 seconds
There are still 250 tests without t.Parallel, but I got the important
onces using a script:
$ go test -short -v 2>&1 | go run ~/slowtests.go
Where slowtests.go is https://play.golang.org/p/9mh5Wg1nLN
The remaining 250 (the output lines from slowtests.go) all have a
reported duration of 0ms, except one 50ms test which has to be serial.
Where tests can't be parallel, I left a comment at the top saying why,
so people don't add t.Parallel later and get surprised at failures.
Updates #17751
Change-Id: Icbe32cbe2b996e23c89f1af6339287fa22af5115
Reviewed-on: https://go-review.googlesource.com/32684
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Diffstat (limited to 'src/encoding/json/encode_test.go')
0 files changed, 0 insertions, 0 deletions
