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
0c359e4b
Unverified
Commit
0c359e4b
authored
Apr 02, 2020
by
ucwong
Committed by
GitHub
Apr 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
p2p/discv5, p2p/testing: add missing Timer.Stop calls in tests (#20869)
parent
37d63578
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
sim_test.go
p2p/discv5/sim_test.go
+2
-1
protocolsession.go
p2p/testing/protocolsession.go
+1
-0
No files found.
p2p/discv5/sim_test.go
View file @
0c359e4b
...
...
@@ -43,6 +43,7 @@ func TestSimRandomResolve(t *testing.T) {
// A new node joins every 10s.
launcher
:=
time
.
NewTicker
(
10
*
time
.
Second
)
defer
launcher
.
Stop
()
go
func
()
{
for
range
launcher
.
C
{
net
:=
sim
.
launchNode
(
false
)
...
...
@@ -55,7 +56,6 @@ func TestSimRandomResolve(t *testing.T) {
}()
time
.
Sleep
(
3
*
time
.
Hour
)
launcher
.
Stop
()
sim
.
shutdown
()
sim
.
printStats
()
}
...
...
@@ -196,6 +196,7 @@ func randomResolves(t *testing.T, s *simulation, net *Network) {
}
timer
:=
time
.
NewTimer
(
randtime
())
defer
timer
.
Stop
()
for
{
select
{
case
<-
timer
.
C
:
...
...
p2p/testing/protocolsession.go
View file @
0c359e4b
...
...
@@ -242,6 +242,7 @@ func (s *ProtocolSession) testExchange(e Exchange) error {
t
=
2000
*
time
.
Millisecond
}
alarm
:=
time
.
NewTimer
(
t
)
defer
alarm
.
Stop
()
select
{
case
err
:=
<-
errc
:
return
err
...
...
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