]> Cypherpunks repositories - gostls13.git/commit
net/http/pprof: make TestDeltaProfile less flaky by retrying
authorHana (Hyang-Ah) Kim <hyangah@gmail.com>
Wed, 22 Apr 2020 19:35:45 +0000 (15:35 -0400)
committerHyang-Ah Hana Kim <hyangah@gmail.com>
Wed, 22 Apr 2020 21:08:29 +0000 (21:08 +0000)
commit3e342e8719b8d84a976c05df0c03d9084c5f39e6
tree8f12c78ba9ae13d41c042c1e780e7c72727e32f0
parent4a5d6916ede1a5547f78140c7594a9519bda90e7
net/http/pprof: make TestDeltaProfile less flaky by retrying

In some slow environment, the goroutine for mutexHog2 may not run
within 1secs. So, try with increasing seconds parameters,
and declare failure if it still fails with the longest duration
parameter (32sec).

Also, relax the test condition - previously we expected the
profile's duration is within 0.5~2sec. But obviously, in some
slow environment, that's not even guaranteed. Just check we get
non-zero duration in the result.

Update #38544

Change-Id: Ia9b0d51429a2093e6c9eb92cf463ff6952ef3e10
Reviewed-on: https://go-review.googlesource.com/c/go/+/229498
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/net/http/pprof/pprof_test.go