Remove all sleeps from `status_endpoint_test.go

pull/136/head
William Tisäter 2014-05-09 02:06:19 +02:00
parent f4597403e3
commit 69eef2b455
1 changed files with 2 additions and 3 deletions

View File

@ -3,7 +3,7 @@ package agent
import (
"os"
"testing"
"time"
"github.com/hashicorp/consul/testutil"
)
func TestStatusLeader(t *testing.T) {
@ -12,8 +12,7 @@ func TestStatusLeader(t *testing.T) {
defer srv.Shutdown()
defer srv.agent.Shutdown()
// Wait for a leader
time.Sleep(100 * time.Millisecond)
testutil.WaitForLeader(t, srv.agent.RPC, "dc1")
obj, err := srv.StatusLeader(nil, nil)
if err != nil {