From 3eadf34d48ecd823994ee6ddee4e92945a4e297a Mon Sep 17 00:00:00 2001 From: Mark Mandel Date: Mon, 8 Oct 2018 15:14:21 -0700 Subject: [PATCH] Make WaitForFleetCondition take up to 5 minutes Should fix flakiness in autoscaler tests. --- test/e2e/framework/framework.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/e2e/framework/framework.go b/test/e2e/framework/framework.go index 94233f1eb2..d4df574eb7 100644 --- a/test/e2e/framework/framework.go +++ b/test/e2e/framework/framework.go @@ -21,13 +21,12 @@ import ( "net" "time" - "k8s.io/apimachinery/pkg/labels" - "agones.dev/agones/pkg/apis/stable/v1alpha1" "agones.dev/agones/pkg/client/clientset/versioned" "github.com/pkg/errors" "github.com/sirupsen/logrus" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/kubernetes" @@ -119,7 +118,7 @@ func (f *Framework) WaitForGameServerState(gs *v1alpha1.GameServer, state v1alph // WaitForFleetCondition waits for the Fleet to be in a specific condition func (f *Framework) WaitForFleetCondition(flt *v1alpha1.Fleet, condition func(fleet *v1alpha1.Fleet) bool) error { - err := wait.PollImmediate(2*time.Second, 120*time.Second, func() (bool, error) { + err := wait.PollImmediate(2*time.Second, 5*time.Minute, func() (bool, error) { fleet, err := f.AgonesClient.StableV1alpha1().Fleets(flt.ObjectMeta.Namespace).Get(flt.ObjectMeta.Name, metav1.GetOptions{}) if err != nil { return true, err