Remove all sleeps from `internal_endpoint_test.go`

This commit is contained in:
William Tisäter 2014-05-09 02:11:40 +02:00
parent e27f89fec1
commit d6f3dc510c
1 changed files with 3 additions and 5 deletions

View File

@ -1,10 +1,10 @@
package consul package consul
import ( import (
"github.com/hashicorp/consul/testutil"
"github.com/hashicorp/consul/consul/structs" "github.com/hashicorp/consul/consul/structs"
"os" "os"
"testing" "testing"
"time"
) )
func TestInternal_NodeInfo(t *testing.T) { func TestInternal_NodeInfo(t *testing.T) {
@ -14,8 +14,7 @@ func TestInternal_NodeInfo(t *testing.T) {
client := rpcClient(t, s1) client := rpcClient(t, s1)
defer client.Close() defer client.Close()
// Wait for leader testutil.WaitForLeader(t, client.Call, "dc1")
time.Sleep(100 * time.Millisecond)
arg := structs.RegisterRequest{ arg := structs.RegisterRequest{
Datacenter: "dc1", Datacenter: "dc1",
@ -68,8 +67,7 @@ func TestInternal_NodeDump(t *testing.T) {
client := rpcClient(t, s1) client := rpcClient(t, s1)
defer client.Close() defer client.Close()
// Wait for leader testutil.WaitForLeader(t, client.Call, "dc1")
time.Sleep(100 * time.Millisecond)
arg := structs.RegisterRequest{ arg := structs.RegisterRequest{
Datacenter: "dc1", Datacenter: "dc1",