Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions pkg/domain/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -2078,6 +2078,13 @@ func (do *Domain) gcStatsWorkerExitPreprocessing() {
do.statsOwner.Close()
ch <- struct{}{}
}()
if intest.InTest {
// We should wait for statistics owner to close on exit.
// Otherwise, the goroutine leak detection may fail.
<-ch
logutil.BgLogger().Info("gcStatsWorker exit preprocessing finished")
return
}
select {
case <-ch:
logutil.BgLogger().Info("gcStatsWorker exit preprocessing finished")
Expand Down