Skip to content

Commit

Permalink
Increase etcd test server up timeout to wait.ForeverTestTimeout
Browse files Browse the repository at this point in the history
  • Loading branch information
janetkuo committed May 26, 2016
1 parent f24b7a7 commit 3cc2311
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/storage/etcd/testing/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import (
"testing"
"time"

"k8s.io/kubernetes/pkg/util/wait"

etcd "github.com/coreos/etcd/client"
"github.com/coreos/etcd/etcdserver"
"github.com/coreos/etcd/etcdserver/api/v2http"
Expand Down Expand Up @@ -186,7 +188,7 @@ func (m *EtcdTestServer) launch(t *testing.T) error {
// waitForEtcd wait until etcd is propagated correctly
func (m *EtcdTestServer) waitUntilUp() error {
membersAPI := etcd.NewMembersAPI(m.Client)
for start := time.Now(); time.Since(start) < 5*time.Second; time.Sleep(10 * time.Millisecond) {
for start := time.Now(); time.Since(start) < wait.ForeverTestTimeout; time.Sleep(10 * time.Millisecond) {
members, err := membersAPI.List(context.TODO())
if err != nil {
glog.Errorf("Error when getting etcd cluster members")
Expand Down

0 comments on commit 3cc2311

Please sign in to comment.