Remove all sleeps from `status_endpoint_test.go`

This commit is contained in:
William Tisäter 2014-05-09 01:23:54 +02:00
parent d0b38ad641
commit 5a56d8a2c6
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
package consul
import (
"github.com/hashicorp/consul/testutil"
"github.com/ugorji/go/codec"
"net"
"net/rpc"
@ -38,7 +39,7 @@ func TestStatusLeader(t *testing.T) {
t.Fatalf("unexpected leader: %v", leader)
}
time.Sleep(100 * time.Millisecond)
testutil.WaitForLeader(t, client.Call, "dc1")
if err := client.Call("Status.Leader", arg, &leader); err != nil {
t.Fatalf("err: %v", err)