mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-28 19:31:34 +00:00
Merge pull request #3400 from nspcc-dev/fix-TestServerStartAndShutdown
network: take care of TestServerStartAndShutdown
This commit is contained in:
commit
f553f77d20
1 changed files with 4 additions and 1 deletions
|
@ -95,8 +95,10 @@ func TestServerStartAndShutdown(t *testing.T) {
|
|||
s.register <- p
|
||||
require.Eventually(t, func() bool { return 1 == s.PeerCount() }, time.Second, time.Millisecond*10)
|
||||
|
||||
assert.True(t, s.transports[0].(*fakeTransp).started.Load())
|
||||
require.True(t, s.started.Load())
|
||||
require.Eventually(t, func() bool {
|
||||
return s.transports[0].(*fakeTransp).started.Load()
|
||||
}, 2*time.Second, 200*time.Millisecond)
|
||||
assert.Nil(t, s.txCallback)
|
||||
|
||||
s.Shutdown()
|
||||
|
@ -115,6 +117,7 @@ func TestServerStartAndShutdown(t *testing.T) {
|
|||
s.Start()
|
||||
p := newLocalPeer(t, s)
|
||||
s.register <- p
|
||||
require.Eventually(t, func() bool { return 1 == s.PeerCount() }, time.Second, time.Millisecond*10)
|
||||
|
||||
assert.True(t, s.services["fake"].(*fakeConsensus).started.Load())
|
||||
require.True(t, s.started.Load())
|
||||
|
|
Loading…
Reference in a new issue