fix
This commit is contained in:
+8
-1
@@ -14,12 +14,19 @@ import (
|
||||
// startClient builds and starts an in-process client against the hub, with the
|
||||
// given mappings, returning the running client.
|
||||
func startClient(t *testing.T, hubAddr, psk string, maxConn int, mappings []client.Mapping) *client.Client {
|
||||
t.Helper()
|
||||
return startClientWithPing(t, hubAddr, psk, maxConn, 20000, mappings)
|
||||
}
|
||||
|
||||
// startClientWithPing is startClient with an explicit heartbeat interval, for
|
||||
// tests that need liveness detection to trigger quickly.
|
||||
func startClientWithPing(t *testing.T, hubAddr, psk string, maxConn, pingMs int, mappings []client.Mapping) *client.Client {
|
||||
t.Helper()
|
||||
cfg := &client.Config{
|
||||
Server: hubAddr,
|
||||
PSK: psk,
|
||||
MaxConn: maxConn,
|
||||
PingIntervalMs: 20000,
|
||||
PingIntervalMs: pingMs,
|
||||
Mappings: mappings,
|
||||
}
|
||||
c := client.New(cfg)
|
||||
|
||||
Reference in New Issue
Block a user