From 8f216be89408da4579b1cf998dedca5dd1121333 Mon Sep 17 00:00:00 2001 From: Zihong Zheng Date: Thu, 19 Oct 2017 11:42:16 -0700 Subject: [PATCH] Skip ILB e2e test on GCP if cluster size exceeds limit --- test/e2e/framework/service_util.go | 4 ++++ test/e2e/network/service.go | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/test/e2e/framework/service_util.go b/test/e2e/framework/service_util.go index 84b687a829d..a9dab3a201f 100644 --- a/test/e2e/framework/service_util.go +++ b/test/e2e/framework/service_util.go @@ -89,6 +89,10 @@ const ( // ServiceTestTimeout is used for most polling/waiting activities ServiceTestTimeout = 60 * time.Second + + // GCPMaxInstancesInInstanceGroup is the maximum number of instances supported in + // one instance group on GCP. + GCPMaxInstancesInInstanceGroup = 2000 ) // This should match whatever the default/configured range is diff --git a/test/e2e/network/service.go b/test/e2e/network/service.go index 0d19372c431..0b0beee86cd 100644 --- a/test/e2e/network/service.go +++ b/test/e2e/network/service.go @@ -1339,8 +1339,15 @@ var _ = SIGDescribe("Services", func() { It("should be able to create an internal type load balancer [Slow]", func() { framework.SkipUnlessProviderIs("azure", "gke", "gce") + if framework.ProviderIs("gke", "gce") { + framework.SkipUnlessNodeCountIsAtMost(framework.GCPMaxInstancesInInstanceGroup) + } createTimeout := framework.LoadBalancerCreateTimeoutDefault + if nodes := framework.GetReadySchedulableNodesOrDie(cs); len(nodes.Items) > framework.LargeClusterMinNodesNumber { + createTimeout = framework.LoadBalancerCreateTimeoutLarge + } + pollInterval := framework.Poll * 10 namespace := f.Namespace.Name