Skip to content

Increase e2e test timeouts #129

@SgtCoDFish

Description

@SgtCoDFish

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions