@@ -1727,16 +1727,8 @@ func TestGoroutineLeakProfileConcurrency(t *testing.T) {
17271727 for ctx .Err () == nil {
17281728 var w strings.Builder
17291729 goroutineLeakProf .WriteTo (& w , 1 )
1730- // NOTE(vsaioc): We cannot always guarantee that the leak will
1731- // actually be recorded in the profile when making concurrent
1732- // goroutine leak requests, because the GC runs concurrently with
1733- // the profiler and may reset the leaked goroutines' status before
1734- // a concurrent profiler has the chance to record them. However,
1735- // the goroutine leak count will persist throughout.
1736- //
1737- // Other tests are not expected to leak goroutines,
1738- // so the count should be consistent.
17391730 countLeaks (t , 2 * leakCount , w .String ())
1731+ includesLeak (t , "goroutineleak" , w .String ())
17401732 }
17411733 }()
17421734 })
@@ -1760,16 +1752,8 @@ func TestGoroutineLeakProfileConcurrency(t *testing.T) {
17601752 for ctx .Err () == nil {
17611753 var w strings.Builder
17621754 goroutineLeakProf .WriteTo (& w , 1 )
1763- // NOTE(vsaioc): We cannot always guarantee that the leak will
1764- // actually be recorded in the profile when making concurrent
1765- // goroutine leak requests, because the GC runs concurrently with
1766- // the profiler and may reset the leaked goroutines' status before
1767- // a concurrent profiler has the chance to record them. However,
1768- // the goroutine leak count will persist throughout.
1769- //
1770- // Other tests are not expected to leak goroutines,
1771- // so the count should be consistent.
17721755 countLeaks (t , 2 * leakCount , w .String ())
1756+ includesLeak (t , "goroutineleak" , w .String ())
17731757 }
17741758 }()
17751759 go func () {
0 commit comments