Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
53e034ce
Unverified
Commit
53e034ce
authored
Apr 02, 2020
by
ucwong
Committed by
GitHub
Apr 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
metrics: add missing calls to Ticker.Stop in tests (#20866)
parent
0893ee6d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
0 deletions
+2
-0
meter_test.go
metrics/meter_test.go
+1
-0
sample_test.go
metrics/sample_test.go
+1
-0
No files found.
metrics/meter_test.go
View file @
53e034ce
...
@@ -26,6 +26,7 @@ func TestMeterDecay(t *testing.T) {
...
@@ -26,6 +26,7 @@ func TestMeterDecay(t *testing.T) {
ticker
:
time
.
NewTicker
(
time
.
Millisecond
),
ticker
:
time
.
NewTicker
(
time
.
Millisecond
),
meters
:
make
(
map
[
*
StandardMeter
]
struct
{}),
meters
:
make
(
map
[
*
StandardMeter
]
struct
{}),
}
}
defer
ma
.
ticker
.
Stop
()
m
:=
newStandardMeter
()
m
:=
newStandardMeter
()
ma
.
meters
[
m
]
=
struct
{}{}
ma
.
meters
[
m
]
=
struct
{}{}
go
ma
.
tick
()
go
ma
.
tick
()
...
...
metrics/sample_test.go
View file @
53e034ce
...
@@ -346,6 +346,7 @@ func TestUniformSampleConcurrentUpdateCount(t *testing.T) {
...
@@ -346,6 +346,7 @@ func TestUniformSampleConcurrentUpdateCount(t *testing.T) {
quit
:=
make
(
chan
struct
{})
quit
:=
make
(
chan
struct
{})
go
func
()
{
go
func
()
{
t
:=
time
.
NewTicker
(
10
*
time
.
Millisecond
)
t
:=
time
.
NewTicker
(
10
*
time
.
Millisecond
)
defer
t
.
Stop
()
for
{
for
{
select
{
select
{
case
<-
t
.
C
:
case
<-
t
.
C
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment