mirror of https://github.com/status-im/consul.git
test: Speedup TestClient_RPC_ConsulServerPing
This commit is contained in:
parent
37c180a920
commit
f763c24c69
|
@ -275,9 +275,9 @@ func TestClient_RPC_ConsulServerPing(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sleep to allow Serf to sync, shuffle, and let the shuffle complete
|
// Sleep to allow Serf to sync, shuffle, and let the shuffle complete
|
||||||
time.Sleep(1 * time.Second)
|
time.Sleep(100 * time.Millisecond)
|
||||||
c.servers.ResetRebalanceTimer()
|
c.servers.ResetRebalanceTimer()
|
||||||
time.Sleep(1 * time.Second)
|
time.Sleep(100 * time.Millisecond)
|
||||||
|
|
||||||
if len(c.LANMembers()) != numServers+numClients {
|
if len(c.LANMembers()) != numServers+numClients {
|
||||||
t.Errorf("bad len: %d", len(c.LANMembers()))
|
t.Errorf("bad len: %d", len(c.LANMembers()))
|
||||||
|
@ -291,7 +291,7 @@ func TestClient_RPC_ConsulServerPing(t *testing.T) {
|
||||||
// Ping each server in the list
|
// Ping each server in the list
|
||||||
var pingCount int
|
var pingCount int
|
||||||
for range servers {
|
for range servers {
|
||||||
time.Sleep(1 * time.Second)
|
time.Sleep(100 * time.Millisecond)
|
||||||
s := c.servers.FindServer()
|
s := c.servers.FindServer()
|
||||||
ok, err := c.connPool.PingConsulServer(s)
|
ok, err := c.connPool.PingConsulServer(s)
|
||||||
if !ok {
|
if !ok {
|
||||||
|
|
Loading…
Reference in New Issue