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

Fix test flake due to expecting exactly one event #67

Merged
merged 1 commit into from
Apr 25, 2023

Conversation

squaremo
Copy link
Contributor

The test TestEventsWithReconciling checks that a resource has an event indicating a successful reconciliation, when reconciliation succeeds. It can be flakey, though, because it asserts the value of the whole list of events, and the controller can post multiple events before it gets checked.

So, instead: check that the list of events contains an event indicating success.

The test TestEventsWithReconciling checks that a resource has an event
indicating a successful reconciliation, when reconciliation
succeeds. It can be flakey, though, because it asserts the value of
the whole list of events, and the controller can post multiple events
before it gets checked.

So, instead: check that the list of events _contains_ an event
indicating success.

Signed-off-by: Michael Bridgen <[email protected]>
@bigkevmcd bigkevmcd merged commit 9a4f631 into weaveworks:main Apr 25, 2023
@bigkevmcd bigkevmcd deleted the test-flake branch April 25, 2023 09:54
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