From 35626b2a7b94157ab3088d692141fdc90e02235f Mon Sep 17 00:00:00 2001 From: gmarek Date: Thu, 17 Nov 2016 16:41:22 +0100 Subject: [PATCH] Wait for all Nodes to be schedulable before running e2e tests --- test/e2e/density.go | 4 ---- test/e2e/e2e.go | 5 +++++ test/e2e/load.go | 5 ----- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/test/e2e/density.go b/test/e2e/density.go index cbf91de4838..93c8fc20e27 100644 --- a/test/e2e/density.go +++ b/test/e2e/density.go @@ -310,10 +310,6 @@ var _ = framework.KubeDescribe("Density", func() { c = f.ClientSet ns = f.Namespace.Name - // In large clusters we may get to this point but still have a bunch - // of nodes without Routes created. Since this would make a node - // unschedulable, we need to wait until all of them are schedulable. - framework.ExpectNoError(framework.WaitForAllNodesSchedulable(c, framework.NodeSchedulableTimeout)) masters, nodes = framework.GetMasterAndWorkerNodesOrDie(c) nodeCount = len(nodes.Items) Expect(nodeCount).NotTo(BeZero()) diff --git a/test/e2e/e2e.go b/test/e2e/e2e.go index a76eb725537..ba0da19a614 100644 --- a/test/e2e/e2e.go +++ b/test/e2e/e2e.go @@ -116,6 +116,11 @@ var _ = ginkgo.SynchronizedBeforeSuite(func() []byte { } } + // In large clusters we may get to this point but still have a bunch + // of nodes without Routes created. Since this would make a node + // unschedulable, we need to wait until all of them are schedulable. + framework.ExpectNoError(framework.WaitForAllNodesSchedulable(c, framework.NodeSchedulableTimeout)) + // Ensure all pods are running and ready before starting tests (otherwise, // cluster infrastructure pods that are being pulled or started can block // test pods from running, and tests that ensure all pods are running and diff --git a/test/e2e/load.go b/test/e2e/load.go index bfd8f69ded9..6c400054e5d 100644 --- a/test/e2e/load.go +++ b/test/e2e/load.go @@ -98,11 +98,6 @@ var _ = framework.KubeDescribe("Load capacity", func() { BeforeEach(func() { clientset = f.ClientSet - // In large clusters we may get to this point but still have a bunch - // of nodes without Routes created. Since this would make a node - // unschedulable, we need to wait until all of them are schedulable. - framework.ExpectNoError(framework.WaitForAllNodesSchedulable(clientset, framework.NodeSchedulableTimeout)) - ns = f.Namespace.Name nodes := framework.GetReadySchedulableNodesOrDie(clientset) nodeCount = len(nodes.Items)