mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-14 05:41:21 +00:00
crank context timeouts
This commit is contained in:
@ -17,6 +17,8 @@ import (
|
||||
types "github.com/tendermint/tendermint/rpc/lib/types"
|
||||
)
|
||||
|
||||
var wsCallTimeout = 5 * time.Second
|
||||
|
||||
type myHandler struct {
|
||||
closeConnAfterRead bool
|
||||
mtx sync.RWMutex
|
||||
@ -138,7 +140,7 @@ func TestWSClientReconnectFailure(t *testing.T) {
|
||||
|
||||
// results in WS write error
|
||||
// provide timeout to avoid blocking
|
||||
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
|
||||
ctx, cancel := context.WithTimeout(context.Background(), wsCallTimeout)
|
||||
defer cancel()
|
||||
c.Call(ctx, "a", make(map[string]interface{}))
|
||||
|
||||
|
Reference in New Issue
Block a user