Commit 0beaea0a authored by gmarek's avatar gmarek

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

parent 07664a61
...@@ -388,12 +388,16 @@ func performTemporaryNetworkFailure(c *client.Client, ns, rcName string, replica ...@@ -388,12 +388,16 @@ func performTemporaryNetworkFailure(c *client.Client, ns, rcName string, replica
var _ = Describe("Nodes", func() { var _ = Describe("Nodes", func() {
framework := NewFramework("resize-nodes") framework := NewFramework("resize-nodes")
var systemPodsNo int
var c *client.Client var c *client.Client
var ns string var ns string
BeforeEach(func() { BeforeEach(func() {
c = framework.Client c = framework.Client
ns = framework.Namespace.Name 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() { Describe("Resize", func() {
...@@ -424,10 +428,8 @@ var _ = Describe("Nodes", func() { ...@@ -424,10 +428,8 @@ var _ = Describe("Nodes", func() {
// Many e2e tests assume that the cluster is fully healthy before they start. Wait until // Many e2e tests assume that the cluster is fully healthy before they start. Wait until
// the cluster is restored to health. // the cluster is restored to health.
By("waiting for system pods to successfully restart") 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()) Expect(err).NotTo(HaveOccurred())
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment