mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 14:52:17 +00:00
read from ErrorsCh also
This commit is contained in:
parent
05e1a22d5b
commit
720b74d89e
20
rpc_test.go
20
rpc_test.go
@ -140,16 +140,20 @@ func testWS(t *testing.T, cl *client.WSClient) {
|
|||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
msg := <-cl.ResultsCh
|
select {
|
||||||
result := new(Result)
|
case msg := <-cl.ResultsCh:
|
||||||
wire.ReadJSONPtr(result, msg, &err)
|
result := new(Result)
|
||||||
if err != nil {
|
wire.ReadJSONPtr(result, msg, &err)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
got := (*result).(*ResultStatus).Value
|
||||||
|
if got != val {
|
||||||
|
t.Fatalf("Got: %v .... Expected: %v \n", got, val)
|
||||||
|
}
|
||||||
|
case err := <-cl.ErrorsCh:
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
got := (*result).(*ResultStatus).Value
|
|
||||||
if got != val {
|
|
||||||
t.Fatalf("Got: %v .... Expected: %v \n", got, val)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------
|
//-------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user