Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase e2e test timeouts #129

Open
SgtCoDFish opened this issue Apr 29, 2024 · 0 comments
Open

Increase e2e test timeouts #129

SgtCoDFish opened this issue Apr 29, 2024 · 0 comments

Comments

@SgtCoDFish
Copy link
Member

SgtCoDFish commented Apr 29, 2024

Currently timeouts for checking for success are scattered across tests (e.g. here) and so are hard to change.

They're also quite low and could easily flake in a resource constrained testing environment.

It would be better to have a single const controlling global timeouts to make this easier to change and to make it obvious what's happening.

The above linked code block could be rewritten to:

Eventually(func() bool {
	Expect(f.Client().Get(f.Context(), client.ObjectKeyFromObject(&certificateRequest), &certificateRequest)).NotTo(HaveOccurred())
	return apiutil.CertificateRequestIsApproved(&certificateRequest)
}).WithTimeout(testTimeout).WithInterval(pollInterval).WithContext(ctx).Should(BeTrue(), "expected request to become approved in time")

Note that this also passes the context into the Eventually function which would be useful if we were to enforce a global timeout on all e2e tests in the future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant