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

connmgr: Use eventually equal helper in connmgr tests #2128

Merged
merged 2 commits into from
Feb 27, 2023

Conversation

MarcoPolo
Copy link
Collaborator

@MarcoPolo MarcoPolo commented Feb 22, 2023

These tests relied on some background goroutine doing some work. This changes the equal checks to allow the tests to pass even if the background work doesn't happen instantly.

Fixes #1324. Fixes #1687. Fixes #1733. Fixes #1814.

Copy link
Contributor

@marten-seemann marten-seemann left a comment

Choose a reason for hiding this comment

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

Not a big fan of the the helper function, as it makes the assertion more difficult to read.

@MarcoPolo
Copy link
Collaborator Author

I'll add an error message

@marten-seemann
Copy link
Contributor

I was suggesting to use require.Eventually directly.

@MarcoPolo
Copy link
Collaborator Author

How does that help? The helper function has a t.Helper call. And using eventually directly doesn't tell you the expected vs actual unless you do something similar.

@marten-seemann marten-seemann changed the title Connmgr: Use eventually equal helper in connmgr tests connmgr: Use eventually equal helper in connmgr tests Feb 24, 2023
@MarcoPolo MarcoPolo merged commit 11e26df into master Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants