rpc/server: properly shutdown things in subscription test
Chain is the last one to Close().
This commit is contained in:
parent
d4d8238e91
commit
23fb5dd420
1 changed files with 2 additions and 2 deletions
|
@ -89,11 +89,11 @@ func TestSubscriptions(t *testing.T) {
|
|||
var subFeeds = []string{"block_added", "transaction_added", "notification_from_execution", "transaction_executed", "notary_request_event"}
|
||||
|
||||
chain, rpcSrv, c, respMsgs, finishedFlag := initCleanServerAndWSClient(t)
|
||||
defer chain.Close()
|
||||
defer func() { _ = rpcSrv.Shutdown() }()
|
||||
|
||||
go rpcSrv.coreServer.Start(make(chan error))
|
||||
defer rpcSrv.coreServer.Shutdown()
|
||||
defer chain.Close()
|
||||
defer func() { _ = rpcSrv.Shutdown() }()
|
||||
|
||||
for _, feed := range subFeeds {
|
||||
s := callSubscribe(t, c, respMsgs, fmt.Sprintf(`["%s"]`, feed))
|
||||
|
|
Loading…
Reference in a new issue