mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-01 13:41:42 +00:00
linters: modify code to pass maligned and interfacer (#3959)
* Fix maligned structs * Fix interfacer errors * Revert accidental go.mod and go.sum changes * Revert P2PConfig struct maligned reorder * Revert PeerRoundState struct maligned reordering * Revert RoundState struct maligned reordering * Reorder WSClient struct * Revert accidental type change * Clean up type change * Clean up type changes * Revert to types.ABCIApplicationServer in GRPCServer struct * Revert maligned changes to BaseConfig struct * Fix tests in io_test.go * Fix client_test package tests * Fix reactor tests in consensus package * Fix new interfacer errors
This commit is contained in:
committed by
Anton Kaliaev
parent
68f8fba7c2
commit
05075ea5b7
@ -3,7 +3,6 @@ package rpcclient
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"sync"
|
||||
@ -65,7 +64,7 @@ func TestWSClientReconnectsAfterReadFailure(t *testing.T) {
|
||||
s := httptest.NewServer(h)
|
||||
defer s.Close()
|
||||
|
||||
c := startClient(t, s.Listener.Addr())
|
||||
c := startClient(t, s.Listener.Addr().String())
|
||||
defer c.Stop()
|
||||
|
||||
wg.Add(1)
|
||||
@ -97,7 +96,7 @@ func TestWSClientReconnectsAfterWriteFailure(t *testing.T) {
|
||||
h := &myHandler{}
|
||||
s := httptest.NewServer(h)
|
||||
|
||||
c := startClient(t, s.Listener.Addr())
|
||||
c := startClient(t, s.Listener.Addr().String())
|
||||
defer c.Stop()
|
||||
|
||||
wg.Add(2)
|
||||
@ -125,7 +124,7 @@ func TestWSClientReconnectFailure(t *testing.T) {
|
||||
h := &myHandler{}
|
||||
s := httptest.NewServer(h)
|
||||
|
||||
c := startClient(t, s.Listener.Addr())
|
||||
c := startClient(t, s.Listener.Addr().String())
|
||||
defer c.Stop()
|
||||
|
||||
go func() {
|
||||
@ -174,7 +173,7 @@ func TestWSClientReconnectFailure(t *testing.T) {
|
||||
func TestNotBlockingOnStop(t *testing.T) {
|
||||
timeout := 2 * time.Second
|
||||
s := httptest.NewServer(&myHandler{})
|
||||
c := startClient(t, s.Listener.Addr())
|
||||
c := startClient(t, s.Listener.Addr().String())
|
||||
c.Call(context.Background(), "a", make(map[string]interface{}))
|
||||
// Let the readRoutine get around to blocking
|
||||
time.Sleep(time.Second)
|
||||
@ -194,8 +193,8 @@ func TestNotBlockingOnStop(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func startClient(t *testing.T, addr net.Addr) *WSClient {
|
||||
c := NewWSClient(addr.String(), "/websocket")
|
||||
func startClient(t *testing.T, addr string) *WSClient {
|
||||
c := NewWSClient(addr, "/websocket")
|
||||
err := c.Start()
|
||||
require.Nil(t, err)
|
||||
c.SetLogger(log.TestingLogger())
|
||||
|
Reference in New Issue
Block a user