mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
metrics : Add missing ticker.Stop() calls for metrics tests
This commit is contained in:
parent
66ed58bfcc
commit
a00f1d476a
2 changed files with 2 additions and 0 deletions
|
|
@ -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 a new issue