From 18fada0cfb6ef1c7f6a3ddfa5f144c586b621e1a Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Wed, 8 Nov 2023 17:39:11 +0200 Subject: [PATCH] test/e2e: increase timeout for waiting node status In some occasions the node status (capacity) takes a lot of time to update. Increase the timeout on extended resource tests. Revert the default timeout back to 10s. --- test/e2e/gomega.go | 2 +- test/e2e/node_feature_discovery_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/gomega.go b/test/e2e/gomega.go index 487ddc032..c881637df 100644 --- a/test/e2e/gomega.go +++ b/test/e2e/gomega.go @@ -39,7 +39,7 @@ type k8sAnnotations map[string]string func eventuallyNonControlPlaneNodes(ctx context.Context, cli clientset.Interface) AsyncAssertion { return Eventually(func(g Gomega, ctx context.Context) ([]corev1.Node, error) { return getNonControlPlaneNodes(ctx, cli) - }).WithPolling(1 * time.Second).WithTimeout(20 * time.Second).WithContext(ctx) + }).WithPolling(1 * time.Second).WithTimeout(10 * time.Second).WithContext(ctx) } // MatchLabels returns a specialized Gomega matcher for checking if a list of diff --git a/test/e2e/node_feature_discovery_test.go b/test/e2e/node_feature_discovery_test.go index 62c61ddea..5493acd75 100644 --- a/test/e2e/node_feature_discovery_test.go +++ b/test/e2e/node_feature_discovery_test.go @@ -799,7 +799,7 @@ core: eventuallyNonControlPlaneNodes(ctx, f.ClientSet).Should(MatchAnnotations(expectedAnnotations, nodes)) By("Verifying node status capacity from NodeFeatureRules #4") - eventuallyNonControlPlaneNodes(ctx, f.ClientSet).Should(MatchCapacity(expectedCapacity, nodes)) + eventuallyNonControlPlaneNodes(ctx, f.ClientSet).WithTimeout(1 * time.Minute).Should(MatchCapacity(expectedCapacity, nodes)) By("Deleting NodeFeatureRules #4") err = nfdClient.NfdV1alpha1().NodeFeatureRules().Delete(ctx, "e2e-extened-resource-test", metav1.DeleteOptions{}) @@ -808,7 +808,7 @@ core: By("Verifying node status capacity from NodeFeatureRules #4 was removed") expectedCapacity = map[string]corev1.ResourceList{"*": {}} delete(expectedAnnotations["*"], "nfd.node.kubernetes.io/extended-resources") - eventuallyNonControlPlaneNodes(ctx, f.ClientSet).Should(MatchCapacity(expectedCapacity, nodes)) + eventuallyNonControlPlaneNodes(ctx, f.ClientSet).WithTimeout(1 * time.Minute).Should(MatchCapacity(expectedCapacity, nodes)) eventuallyNonControlPlaneNodes(ctx, f.ClientSet).Should(MatchAnnotations(expectedAnnotations, nodes)) By("Creating NodeFeatureRules #5")