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

test(e2e): change consitently to eventually #12097

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

lukidzi
Copy link
Contributor

@lukidzi lukidzi commented Nov 25, 2024

Motivation

I've noticed a flake in a specific test. We are using Consistently, which expects that error code 52 will always be returned. This is a correct assumption, unless something happens on the network and we receive a different error code.

  [FAILED] Failed after 0.250s.
  The function passed to Consistently failed at github.com/kumahq/kuma/test/e2e/reachableservices/auto_reachable_services_k8s.go:100 with:
  Expected
      <int>: 56
  to equal
      <int>: 52
Error: It 11/22/24 10:02:24.833

Implementation information

To avoid this flake, I changed Consistently to Eventually and added MustPassRepeatedly. We cannot guarantee that the network is 100% reliable, so we have two options:

  • Add another error code to check, or
  • If it fails, wait for 5 consecutive successes.

Supporting documentation

https://github.com/kumahq/kuma/actions/runs/11969768862/job/33372432545

@lukidzi lukidzi requested a review from a team as a code owner November 25, 2024 11:18
@lukidzi lukidzi requested review from jakubdyszkiewicz and Automaat and removed request for a team November 25, 2024 11:18
@lukidzi lukidzi merged commit 7521c57 into kumahq:master Nov 27, 2024
13 checks passed
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

Successfully merging this pull request may close these issues.

2 participants