1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00

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.
This commit is contained in:
Markus Lehtonen 2023-11-08 17:39:11 +02:00
parent 15f33c926e
commit 18fada0cfb
2 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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")