From 79dbdbb4c15fbfcdc87a1654fb668ce0719ae4f6 Mon Sep 17 00:00:00 2001 From: Artyom Lukianov Date: Sun, 25 Apr 2021 13:39:30 +0300 Subject: [PATCH] e2e node: fix the race condition under the memory manager test Wait for kubelet to be healthy after the dynamic update of the kubelet configuration. Signed-off-by: Artyom Lukianov --- test/e2e_node/memory_manager_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/e2e_node/memory_manager_test.go b/test/e2e_node/memory_manager_test.go index 0d679e2a043..4a063c66900 100644 --- a/test/e2e_node/memory_manager_test.go +++ b/test/e2e_node/memory_manager_test.go @@ -383,6 +383,14 @@ var _ = SIGDescribe("Memory Manager [Serial] [Feature:MemoryManager][NodeAlphaFe // update the kubelet config with old values updateKubeletConfig(f, oldCfg) + + // wait until the kubelet health check will pass and will continue to pass for specified period of time + gomega.Eventually(func() bool { + return kubeletHealthCheck(kubeletHealthCheckURL) + }, time.Minute, 10*time.Second).Should(gomega.BeTrue()) + gomega.Consistently(func() bool { + return kubeletHealthCheck(kubeletHealthCheckURL) + }, time.Minute, 10*time.Second).Should(gomega.BeTrue()) }) ginkgo.Context("with static policy", func() {