good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit 53e034ce authored by ucwong's avatar ucwong Committed by GitHub
Browse files

metrics: add missing calls to Ticker.Stop in tests (#20866)

parent 0893ee6d
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,7 @@ func TestMeterDecay(t *testing.T) {
ticker: time.NewTicker(time.Millisecond),
meters: make(map[*StandardMeter]struct{}),
}
defer ma.ticker.Stop()
m := newStandardMeter()
ma.meters[m] = struct{}{}
go ma.tick()
......
......@@ -346,6 +346,7 @@ func TestUniformSampleConcurrentUpdateCount(t *testing.T) {
quit := make(chan struct{})
go func() {
t := time.NewTicker(10 * time.Millisecond)
defer t.Stop()
for {
select {
case <-t.C:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment