mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-21 17:01:35 +00:00
allow to change pong wait and ping period
This commit is contained in:
@ -11,6 +11,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
|
||||
@ -188,6 +189,12 @@ func TestWSClientReconnectFailure(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestWSClientPingPongOption(t *testing.T) {
|
||||
assert.Panics(t, func() {
|
||||
NewWSClient("tcp://localhost:8080", "/websocket", PingPong(2*time.Second, 2*time.Second))
|
||||
})
|
||||
}
|
||||
|
||||
func startClient(t *testing.T, addr net.Addr) *WSClient {
|
||||
c := NewWSClient(addr.String(), "/websocket")
|
||||
_, err := c.Start()
|
||||
|
Reference in New Issue
Block a user