Merge "discovery: change Advertise() to return done channel"
diff --git a/test/goroutines/goroutines.go b/test/goroutines/goroutines.go
index 1169906..555d666 100644
--- a/test/goroutines/goroutines.go
+++ b/test/goroutines/goroutines.go
@@ -45,11 +45,11 @@
bufsize *= 2
buf = make([]byte, bufsize)
}
- return Parse(buf)
+ return Parse(buf, true)
}
// Parse parses a stack trace into a structure representation.
-func Parse(buf []byte) ([]*Goroutine, error) {
+func Parse(buf []byte, ignore bool) ([]*Goroutine, error) {
scanner := bufio.NewScanner(bytes.NewReader(buf))
var out []*Goroutine
for scanner.Scan() {
@@ -60,7 +60,7 @@
if err != nil {
return out, fmt.Errorf("Error %v parsing trace:\n%s", err, string(buf))
}
- if !shouldIgnore(g) {
+ if !ignore || !shouldIgnore(g) {
out = append(out, g)
}
}
diff --git a/test/goroutines/goroutines_test.go b/test/goroutines/goroutines_test.go
index c8c236c..3b3f725 100644
--- a/test/goroutines/goroutines_test.go
+++ b/test/goroutines/goroutines_test.go
@@ -107,7 +107,7 @@
buf = buf[:runtime.Stack(buf, true)]
close(wait)
- gs, err := Parse(buf)
+ gs, err := Parse(buf, false)
if err != nil {
t.Fatal(err)
}