tests instantiating clients w/o shutting down (#16755)
noticed via their port still in use messages.
This commit is contained in:
parent
ee3adde5b7
commit
56b93388bc
|
@ -824,6 +824,7 @@ func TestClient_ReloadConfig(t *testing.T) {
|
|||
deps := newDefaultDeps(t, &Config{NodeName: "node1", Datacenter: "dc1"})
|
||||
c, err := NewClient(cfg, deps)
|
||||
require.NoError(t, err)
|
||||
defer c.Shutdown()
|
||||
|
||||
limiter := c.rpcLimiter.Load().(*rate.Limiter)
|
||||
require.Equal(t, rate.Limit(500), limiter.Limit())
|
||||
|
@ -869,7 +870,6 @@ func TestClient_ShortReconnectTimeout(t *testing.T) {
|
|||
func() bool {
|
||||
return len(cluster.Servers[0].LANMembersInAgentPartition()) == 2 &&
|
||||
len(cluster.Clients[0].LANMembersInAgentPartition()) == 2
|
||||
|
||||
},
|
||||
time.Second,
|
||||
50*time.Millisecond,
|
||||
|
@ -901,6 +901,7 @@ func TestClient_RPC_Timeout(t *testing.T) {
|
|||
c.MaxQueryTime = 200 * time.Millisecond
|
||||
c.RPCHoldTimeout = 50 * time.Millisecond
|
||||
})
|
||||
defer c1.Shutdown()
|
||||
joinLAN(t, c1, s1)
|
||||
|
||||
retry.Run(t, func(r *retry.R) {
|
||||
|
|
Loading…
Reference in New Issue