From e1e3101e75179e4597411a75f5c0ffa4f7d3b898 Mon Sep 17 00:00:00 2001 From: gmarek Date: Mon, 7 Sep 2015 15:04:48 +0200 Subject: [PATCH] Add a sleep in resize_nodes test to allow NodeController's Watch to catch up --- test/e2e/resize_nodes.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/e2e/resize_nodes.go b/test/e2e/resize_nodes.go index 7ae33f1ad7..c3674726a0 100644 --- a/test/e2e/resize_nodes.go +++ b/test/e2e/resize_nodes.go @@ -522,10 +522,13 @@ var _ = Describe("Nodes", func() { By(fmt.Sprintf("block network traffic from node %s", node.Name)) performTemporaryNetworkFailure(c, ns, name, replicas, pods.Items[0].Name, node) Logf("Waiting %v for node %s to be ready once temporary network failure ends", resizeNodeReadyTimeout, node.Name) - if !waitForNodeToBe(c, node.Name, true, resizeNodeReadyTimeout) { + if !waitForNodeToBeReady(c, node.Name, resizeNodeReadyTimeout) { Failf("Node %s did not become ready within %v", node.Name, resizeNodeReadyTimeout) } + // sleep a bit, to allow Watch in NodeController to catch up. + time.Sleep(5 * time.Second) + By("verify whether new pods can be created on the re-attached node") // increasing the RC size is not a valid way to test this // since we have no guarantees the pod will be scheduled on our node.