]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/vendor/.../pprof: do not run test that opens web browser
authorRuss Cox <rsc@golang.org>
Fri, 10 Nov 2017 01:38:11 +0000 (20:38 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 10 Nov 2017 01:42:10 +0000 (01:42 +0000)
Obviously not OK.

For #22651.

Change-Id: I4238045bec6e50788daaa27a7fbc1d547e72cde9
Reviewed-on: https://go-review.googlesource.com/76870
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/vendor/github.com/google/pprof/internal/driver/webui_test.go

index 76565eb8ee4a0355b48ed43d881f5e956109f8b1..96380a01b3966060864c45ec547e780a4fbc2aed 100644 (file)
@@ -25,13 +25,22 @@ import (
        "regexp"
        "sync"
        "testing"
+       "time"
+
+       "runtime"
 
        "github.com/google/pprof/internal/plugin"
        "github.com/google/pprof/profile"
-       "runtime"
 )
 
 func TestWebInterface(t *testing.T) {
+       // This test starts a web browser in a background goroutine
+       // after a 500ms delay. Sometimes the test exits before it
+       // can run the browser, but sometimes the browser does open.
+       // That's obviously unacceptable.
+       defer time.Sleep(2 * time.Second) // to see the browser open
+       t.Skip("golang.org/issue/22651")
+
        if runtime.GOOS == "nacl" {
                t.Skip("test assumes tcp available")
        }
@@ -124,6 +133,8 @@ func TestWebInterface(t *testing.T) {
                }
        }
        wg.Wait()
+
+       time.Sleep(5 * time.Second)
 }
 
 // Implement fake object file support.