From babac47c6f17560fa75139477a83a3db5b6349bd Mon Sep 17 00:00:00 2001 From: RuquanZhao Date: Sat, 23 Sep 2023 00:37:32 +0800 Subject: [PATCH] fix DevicePluginProbe node-e2e: pod and kubelet restarts The kubelet restarts working pods with an exponential back-off delay, with a maximum cap of 5 minutes. The waiting 1 minutes may happen to be in back-off time. Signed-off-by: Ruquan Zhao --- test/e2e_node/device_plugin_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/e2e_node/device_plugin_test.go b/test/e2e_node/device_plugin_test.go index ed05a4d69ae..74ffcdbaa5a 100644 --- a/test/e2e_node/device_plugin_test.go +++ b/test/e2e_node/device_plugin_test.go @@ -384,7 +384,9 @@ func testDevicePlugin(f *framework.Framework, pluginSockDir string) { ginkgo.By("Checking an instance of the pod is running") gomega.Eventually(ctx, getPodByName). WithArguments(f, pod1.Name). - WithTimeout(time.Minute). + // The kubelet restarts pod with an exponential back-off delay, with a maximum cap of 5 minutes. + // Allow 5 minutes and 10 seconds for the pod to start in a slow environment. + WithTimeout(5*time.Minute+10*time.Second). Should(gomega.And( BeAPodInPhase(v1.PodRunning), BeAPodReady(),