From ff50da579eaa254e156153fd2b4256f31b336b2c Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Mon, 26 Aug 2024 11:32:13 +0200 Subject: [PATCH] Fix device plugin node ready test assertion Introduced in d770dd695a4ef15b9fb41e3ef43135f7df55a882 and high likely the issue caused in the failing test: https://github.com/kubernetes/kubernetes/issues/126915 Signed-off-by: Sascha Grunert --- test/e2e_node/device_plugin_test.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/test/e2e_node/device_plugin_test.go b/test/e2e_node/device_plugin_test.go index 58cd82113d4..5520c78dfed 100644 --- a/test/e2e_node/device_plugin_test.go +++ b/test/e2e_node/device_plugin_test.go @@ -803,13 +803,10 @@ func testDevicePluginNodeReboot(f *framework.Framework, pluginSockDir string) { ginkgo.BeforeEach(func(ctx context.Context) { ginkgo.By("Wait for node to be ready") - gomega.Eventually(ctx, func(ctx context.Context) error { - _, err := e2enode.TotalReady(ctx, f.ClientSet) - if err != nil { - return err - } - return nil - }, time.Minute, time.Second).Should(gomega.Equal(1), "one node should be ready") + gomega.Eventually(ctx, e2enode.TotalReady). + WithArguments(f.ClientSet). + WithTimeout(time.Minute). + Should(gomega.BeEquivalentTo(1)) // Before we run the device plugin test, we need to ensure // that the cluster is in a clean state and there are no