Commit a1088483 authored by Russ Cox's avatar Russ Cox

cmd/vendor/.../pprof: do not run test that opens web browser

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: default avatarRuss Cox <rsc@golang.org>
parent 821e3f7d
...@@ -25,13 +25,22 @@ import ( ...@@ -25,13 +25,22 @@ import (
"regexp" "regexp"
"sync" "sync"
"testing" "testing"
"time"
"runtime"
"github.com/google/pprof/internal/plugin" "github.com/google/pprof/internal/plugin"
"github.com/google/pprof/profile" "github.com/google/pprof/profile"
"runtime"
) )
func TestWebInterface(t *testing.T) { 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" { if runtime.GOOS == "nacl" {
t.Skip("test assumes tcp available") t.Skip("test assumes tcp available")
} }
...@@ -124,6 +133,8 @@ func TestWebInterface(t *testing.T) { ...@@ -124,6 +133,8 @@ func TestWebInterface(t *testing.T) {
} }
} }
wg.Wait() wg.Wait()
time.Sleep(5 * time.Second)
} }
// Implement fake object file support. // Implement fake object file support.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment