mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 09:23:48 +00:00
p2p: add log as part of server structs in tests
This commit is contained in:
parent
4c006eb373
commit
21210b98b1
1 changed files with 9 additions and 1 deletions
|
|
@ -27,6 +27,7 @@ import (
|
|||
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/crypto/sha3"
|
||||
"github.com/ethereum/go-ethereum/log"
|
||||
"github.com/ethereum/go-ethereum/p2p/discover"
|
||||
)
|
||||
|
||||
|
|
@ -206,6 +207,7 @@ func TestServerTaskScheduling(t *testing.T) {
|
|||
quit: make(chan struct{}),
|
||||
ntab: fakeTable{},
|
||||
running: true,
|
||||
log: log.New(),
|
||||
}
|
||||
srv.loopWG.Add(1)
|
||||
go func() {
|
||||
|
|
@ -246,7 +248,12 @@ func TestServerManyTasks(t *testing.T) {
|
|||
}
|
||||
|
||||
var (
|
||||
srv = &Server{quit: make(chan struct{}), ntab: fakeTable{}, running: true}
|
||||
srv = &Server{
|
||||
quit: make(chan struct{}),
|
||||
ntab: fakeTable{},
|
||||
running: true,
|
||||
log: log.New(),
|
||||
}
|
||||
done = make(chan *testTask)
|
||||
start, end = 0, 0
|
||||
)
|
||||
|
|
@ -428,6 +435,7 @@ func TestServerSetupConn(t *testing.T) {
|
|||
Protocols: []Protocol{discard},
|
||||
},
|
||||
newTransport: func(fd net.Conn) transport { return test.tt },
|
||||
log: log.New(),
|
||||
}
|
||||
if !test.dontstart {
|
||||
if err := srv.Start(); err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue