diff --git a/rpc/client/mock/abci_test.go b/rpc/client/mock/abci_test.go index a839b0dd..36a45791 100644 --- a/rpc/client/mock/abci_test.go +++ b/rpc/client/mock/abci_test.go @@ -96,10 +96,8 @@ func TestABCIRecorder(t *testing.T) { _, err := r.ABCIInfo() assert.Nil(err, "expected no err on info") - _, err = r.ABCIInfo() - assert.Nil(err, "expected no err on info") - _, err := r.ABCIQueryWithOptions("path", data.Bytes("data"), client.ABCIQueryOptions{Trusted: false}) + _, err = r.ABCIQueryWithOptions("path", data.Bytes("data"), client.ABCIQueryOptions{Trusted: false}) assert.NotNil(err, "expected error on query") require.Equal(2, len(r.Calls)) diff --git a/rpc/lib/rpc_test.go b/rpc/lib/rpc_test.go index d931e7b2..433041c1 100644 --- a/rpc/lib/rpc_test.go +++ b/rpc/lib/rpc_test.go @@ -318,19 +318,12 @@ func TestWSNewWSRPCFunc(t *testing.T) { err = cl.Call(context.Background(), "echo_ws", params) require.Nil(t, err) - select { - case msg := <-cl.ResponsesCh: - if msg.Error != nil { - t.Fatal(err) - } - result := new(ResultEcho) - err = json.Unmarshal(msg.Result, result) - require.Nil(t, err) - got := result.Value - assert.Equal(t, got, val) + msg := <-cl.ResponsesCh + if msg.Error != nil { + t.Fatal(err) } result := new(ResultEcho) - err = json.Unmarshal(*msg.Result, result) + err = json.Unmarshal(msg.Result, result) require.Nil(t, err) got := result.Value assert.Equal(t, got, val) @@ -348,19 +341,12 @@ func TestWSHandlesArrayParams(t *testing.T) { err = cl.CallWithArrayParams(context.Background(), "echo_ws", params) require.Nil(t, err) - select { - case msg := <-cl.ResponsesCh: - if msg.Error != nil { - t.Fatalf("%+v", err) - } - result := new(ResultEcho) - err = json.Unmarshal(msg.Result, result) - require.Nil(t, err) - got := result.Value - assert.Equal(t, got, val) + msg := <-cl.ResponsesCh + if msg.Error != nil { + t.Fatalf("%+v", err) } result := new(ResultEcho) - err = json.Unmarshal(*msg.Result, result) + err = json.Unmarshal(msg.Result, result) require.Nil(t, err) got := result.Value assert.Equal(t, got, val)