mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-21 23:29:38 +00:00
Merge pull request #3261 from nspcc-dev/fix-client-init-test
rpcclient: fix failing initialisation-based tests
This commit is contained in:
commit
a5a87a72c2
1 changed files with 2 additions and 0 deletions
|
@ -34,6 +34,7 @@ func TestWSClientClose(t *testing.T) {
|
||||||
srv := initTestServer(t, `{"jsonrpc": "2.0", "id": 1, "result": "55aaff00"}`)
|
srv := initTestServer(t, `{"jsonrpc": "2.0", "id": 1, "result": "55aaff00"}`)
|
||||||
wsc, err := NewWS(context.TODO(), httpURLtoWS(srv.URL), WSOptions{})
|
wsc, err := NewWS(context.TODO(), httpURLtoWS(srv.URL), WSOptions{})
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
wsc.cache.initDone = true
|
||||||
wsc.getNextRequestID = getTestRequestID
|
wsc.getNextRequestID = getTestRequestID
|
||||||
bCh := make(chan *block.Block)
|
bCh := make(chan *block.Block)
|
||||||
_, err = wsc.ReceiveBlocks(nil, bCh)
|
_, err = wsc.ReceiveBlocks(nil, bCh)
|
||||||
|
@ -666,6 +667,7 @@ func TestWSFilteredSubscriptions(t *testing.T) {
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
wsc.getNextRequestID = getTestRequestID
|
wsc.getNextRequestID = getTestRequestID
|
||||||
wsc.cache.network = netmode.UnitTestNet
|
wsc.cache.network = netmode.UnitTestNet
|
||||||
|
wsc.cache.initDone = true
|
||||||
c.clientCode(t, wsc)
|
c.clientCode(t, wsc)
|
||||||
wsc.Close()
|
wsc.Close()
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue