forked from cerc-io/plugeth
metrics: add missing calls to Ticker.Stop in tests (#20866)
This commit is contained in:
parent
0893ee6d51
commit
53e034ce0b
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user