ResizeNodes test wait for the number of system Pods equal to the one observed before the test

pull/6/head
gmarek 2015-11-23 21:46:23 +01:00
parent 07664a6104
commit 0beaea0af7
1 changed files with 5 additions and 3 deletions

View File

@ -388,12 +388,16 @@ func performTemporaryNetworkFailure(c *client.Client, ns, rcName string, replica
var _ = Describe("Nodes", func() {
framework := NewFramework("resize-nodes")
var systemPodsNo int
var c *client.Client
var ns string
BeforeEach(func() {
c = framework.Client
ns = framework.Namespace.Name
systemPods, err := c.Pods(api.NamespaceSystem).List(labels.Everything(), fields.Everything())
Expect(err).NotTo(HaveOccurred())
systemPodsNo = len(systemPods.Items)
})
Describe("Resize", func() {
@ -424,10 +428,8 @@ var _ = Describe("Nodes", func() {
// Many e2e tests assume that the cluster is fully healthy before they start. Wait until
// the cluster is restored to health.
By("waiting for system pods to successfully restart")
pods, err := framework.Client.Pods(api.NamespaceSystem).List(labels.Everything(), fields.Everything())
Expect(err).NotTo(HaveOccurred())
err = waitForPodsRunningReady(api.NamespaceSystem, len(pods.Items), podReadyBeforeTimeout)
err := waitForPodsRunningReady(api.NamespaceSystem, systemPodsNo, podReadyBeforeTimeout)
Expect(err).NotTo(HaveOccurred())
})