tidb telemetry单元测试问题

【 TiDB 使用环境`
测试环境

【 TiDB 版本】
commit 173dd005cc345a0be0230ccf6f2eb69a63d82e2d

【遇到的问题】

  1. go test 正常, go test -v 报错 Found leaked goroutined BEFORE test appears to have leaked, 稳定复现
  2. 如何复现unstable test #issue 32013

【复现路径】

$ go test -race -v -run ^TestPreview$ github.com/pingcap/tidb/telemetry
=== RUN   TestPreview
    leak.go:102: Found leaked goroutined BEFORE test appears to have leaked :
        go.opencensus.io/stats/view.(*worker).start(0xc00054d900)
                /Users/chenming/.gvm/pkgsets/go1.18/global/pkg/mod/go.opencensus.io@v0.23.0/stats/view/worker.go:276 +0x177
        created by go.opencensus.io/stats/view.init.0
                /Users/chenming/.gvm/pkgsets/go1.18/global/pkg/mod/go.opencensus.io@v0.23.0/stats/view/worker.go:34 +0xf7
--- SKIP: TestPreview (0.05s)
PASS
ok      github.com/pingcap/tidb/telemetry       1.349s

$ go test -race -run ^TestPreview$ github.com/pingcap/tidb/telemetry
ok      github.com/pingcap/tidb/telemetry       1.227s

【问题现象及影响】

【附件】

$ go version
go version go1.18 darwin/amd64

感谢反馈,后续研发同学会修正该问题。

请问单测如何复现unstable test #issue 32013 ?

此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。