]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/pprof: run TestGoroutineSwitch for longer
authorAlex Brainman <alex.brainman@gmail.com>
Sun, 22 Sep 2013 07:31:08 +0000 (17:31 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Sun, 22 Sep 2013 07:31:08 +0000 (17:31 +1000)
Short test now takes about 0.5 second here.

Fixes #6417.

The failure was also seen on our builders.

R=golang-dev, minux.ma, r
CC=golang-dev
https://golang.org/cl/13321048

src/pkg/runtime/pprof/pprof_test.go

index 419178415a773d25e08b447da20e9b2538d83968..f7bb487b7f5cf1a0730a089d20988d4a2f25048b 100644 (file)
@@ -183,11 +183,11 @@ func TestCPUProfileWithFork(t *testing.T) {
 // If it did, it would see inconsistent state and would either record an incorrect stack
 // or crash because the stack was malformed.
 func TestGoroutineSwitch(t *testing.T) {
-       // How much to try. These defaults take about 1 seconds
-       // on a 2012 MacBook Pro. The ones in short mode take
-       // about 0.1 seconds.
+       // How much to try. These defaults take about 6 seconds
+       // on a 2011 Windows 7 64 bit notebook. The ones in short mode take
+       // about 0.6 seconds.
        tries := 10
-       count := 1000000
+       count := 4000000
        if testing.Short() {
                tries = 1
        }