Skip to content

Fix a flake in amqp_client_SUITE #11234

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

Merged
merged 1 commit into from
May 14, 2024

Conversation

the-mikedavis
Copy link
Collaborator

event_recorder listens for events globally rather than per-connection so it's possible for connection_closed and other events from prior test cases to be captured and mixed with the events the test is interested in, causing a flake. For example: https://app.buildbuddy.io/invocation/f31d0f74-02f9-407c-887c-838e0952f60a?target=%2F%2Fdeps%2Frabbit%3Aamqp_client_SUITE&targetStatus=6#1

Instead we can assert that the events we gather from event_recorder contain the ones emitted by the connection.

`event_recorder` listens for events globally rather than per-connection
so it's possible for `connection_closed` and other events from prior
test cases to be captured and mixed with the events the test is
interested in, causing a flake.

Instead we can assert that the events we gather from `event_recorder`
contain the ones emitted by the connection.
Type =:= EventType andalso
lists:all(
fun({Key, _Value}) ->
lists:keymember(Key, 1, EventProps)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit removes assertions of the event property values (e.g. <<"/">> and <<"guest">>).
I'm adding the assertions back in #12302.

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.

3 participants