Skip to content

Delete old events in BeforeSuite to prevent stale event assertions#169

Merged
bjosv merged 1 commit into
valkey-io:mainfrom
Nordix:e2e-clear-events
May 11, 2026
Merged

Delete old events in BeforeSuite to prevent stale event assertions#169
bjosv merged 1 commit into
valkey-io:mainfrom
Nordix:e2e-clear-events

Conversation

@bjosv
Copy link
Copy Markdown
Collaborator

@bjosv bjosv commented May 10, 2026

Summary

Stale events from previous test runs persist on the cluster and intermittently cause event assertions to fail (e.g. StaleNodeForgotten from nodes forgotten after pod IP changes between runs).
The failure depends on whether pods happened to get new IPs on recreation in a previous test run.

Purge all events in BeforeSuite so assertions only see the current run.
The previously targeted resource "valkeycluster-sample" does not exist anyway.

Features / Behaviour Changes

This PR fixes the flaky e2e-test part creates a Valkey Cluster deployment test in valkeycluster_test.go,
in assertion "StaleNodeForgotten event should not be emitted during initial creation"

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one issue.
  • Commit message explains what changed and why
  • Tests are added or updated.
  • Documentation files are updated.
  • I have run pre-commit locally (pre-commit run --all-files or hooks on commit)

Stale events from previous test runs persist on the cluster and
intermittently cause event assertions to fail (e.g. StaleNodeForgotten
from nodes forgotten after pod IP changes between runs). The failure
depends on whether pods happened to get new IPs on recreation.

Purge all events in BeforeSuite so assertions only see the current run.
The previously targeted resource "valkeycluster-sample" does not exist anyway.

Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
@bjosv bjosv merged commit 311cb25 into valkey-io:main May 11, 2026
8 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