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(unit): check correctly active watchdogs #12948

Merged
merged 2 commits into from
Feb 25, 2025

Conversation

lukidzi
Copy link
Contributor

@lukidzi lukidzi commented Feb 25, 2025

Motivation

Noticed a flake of the test.

Implementation information

I was reviewing the test and noticed that we have an active watchdog, but our assertion was incorrectly checking that we didn't. Since this happens asynchronously, there's a potential race condition where the value increases right before the assertion. I updated it to use Eventually to verify that the watchdog is active.

Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
@lukidzi lukidzi added the ci/skip-e2e-test PR: Don't run e2e tests label Feb 25, 2025
@lukidzi lukidzi requested a review from a team as a code owner February 25, 2025 16:08
Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
Copy link
Contributor

Reviewer Checklist

🔍 Each of these sections need to be checked by the reviewer of the PR 🔍:
If something doesn't apply please check the box and add a justification if the reason is non obvious.

  • Is the PR title satisfactory? Is this part of a larger feature and should be grouped using > Changelog?
  • PR description is clear and complete. It Links to relevant issue as well as docs and UI issues
  • This will not break child repos: it doesn't hardcode values (.e.g "kumahq" as an image registry)
  • IPv6 is taken into account (.e.g: no string concatenation of host port)
  • Tests (Unit test, E2E tests, manual test on universal and k8s)
    • Don't forget ci/ labels to run additional/fewer tests
  • Does this contain a change that needs to be notified to users? In this case, UPGRADE.md should be updated.
  • Does it need to be backported according to the backporting policy? (this GH action will add "backport" label based on these file globs, if you want to prevent it from adding the "backport" label use no-backport-autolabel label)

@lukidzi lukidzi merged commit 4c08664 into kumahq:master Feb 25, 2025
11 checks passed
@jijiechen
Copy link
Member

Thank you so much for fixing this for me.

jijiechen pushed a commit to jijiechen/kuma that referenced this pull request Feb 27, 2025
## Motivation

Noticed a flake of the test.

## Implementation information

I was reviewing the test and noticed that we have an active watchdog,
but our assertion was incorrectly checking that we didn't. Since this
happens asynchronously, there's a potential race condition where the
value increases right before the assertion. I updated it to use
`Eventually` to verify that the watchdog is active.

---------

Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
Signed-off-by: Jay Chen <1180092+jijiechen@users.noreply.github.com>
jijiechen pushed a commit to jijiechen/kuma that referenced this pull request Feb 27, 2025
## Motivation

Noticed a flake of the test.

## Implementation information

I was reviewing the test and noticed that we have an active watchdog,
but our assertion was incorrectly checking that we didn't. Since this
happens asynchronously, there's a potential race condition where the
value increases right before the assertion. I updated it to use
`Eventually` to verify that the watchdog is active.

---------

Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
Signed-off-by: Jay Chen <1180092+jijiechen@users.noreply.github.com>
jijiechen pushed a commit to jijiechen/kuma that referenced this pull request Feb 27, 2025
## Motivation

Noticed a flake of the test.

## Implementation information

I was reviewing the test and noticed that we have an active watchdog,
but our assertion was incorrectly checking that we didn't. Since this
happens asynchronously, there's a potential race condition where the
value increases right before the assertion. I updated it to use
`Eventually` to verify that the watchdog is active.

---------

Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
Signed-off-by: Jay Chen <1180092+jijiechen@users.noreply.github.com>
jijiechen added a commit that referenced this pull request Feb 27, 2025
…2970)

Manual cherry-pick of #12948 to branch `release-2.7`

cherry-picked commit 4c08664

---------

Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
Signed-off-by: Jay Chen <1180092+jijiechen@users.noreply.github.com>
Co-authored-by: Lukasz Dziedziak <lukidzi@gmail.com>
jijiechen added a commit that referenced this pull request Feb 27, 2025
…2971)

Manual cherry-pick of #12948 to branch `release-2.8`

cherry-picked commit 4c08664

---------

Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
Signed-off-by: Jay Chen <1180092+jijiechen@users.noreply.github.com>
Co-authored-by: Lukasz Dziedziak <lukidzi@gmail.com>
jijiechen added a commit that referenced this pull request Feb 27, 2025
…2972)

Manual cherry-pick of #12948 to branch `release-2.9`

cherry-picked commit 4c08664

---------

Signed-off-by: Lukasz Dziedziak <lukidzi@gmail.com>
Signed-off-by: Jay Chen <1180092+jijiechen@users.noreply.github.com>
Co-authored-by: Lukasz Dziedziak <lukidzi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/skip-e2e-test PR: Don't run e2e tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants