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

Add tests for refresh_beans and refresh_beans_initial #351

Merged
merged 2 commits into from
Feb 5, 2021

Conversation

ian28223
Copy link
Contributor

Related to #349

Adds tests for both refresh_beans_initial and refresh_beans

  • AC-800

@ian28223 ian28223 self-assigned this Jan 29, 2021
sgnn7
sgnn7 previously approved these changes Jan 29, 2021
Copy link
Contributor

@sgnn7 sgnn7 left a comment

Choose a reason for hiding this comment

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

@ian28223 LGTM. I do feel like sleeping in unit tests is a bit of a problematic pattern but I don't know if there's a better way to do this (without reworking the code heavily).

@ian28223
Copy link
Contributor Author

ian28223 commented Feb 1, 2021

@ian28223 LGTM. I do feel like sleeping in unit tests is a bit of a problematic pattern but I don't know if there's a better way to do this (without reworking the code heavily).

I've reduced the sleep time to cut down on the overall runtime of the test by 10 seconds. I hope this helps a bit

@sgnn7
Copy link
Contributor

sgnn7 commented Feb 1, 2021

@ian28223 This LGTM but we should probably wait for @truthbk to maybe add some feedback if we can remove the sleeps entirely.

@ian28223 ian28223 requested a review from truthbk February 2, 2021 00:49
Copy link
Member

@truthbk truthbk left a comment

Choose a reason for hiding this comment

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

The issue with the sleeps is not as much a problem with test duration (though it's always nice to keep these as short as possible), but rather with the fact it often turns out to be a bit of an anti-pattern that introduces flaky tests.

It's unclear to me, with the current code, how we can avoid sleeping at all, so I think I'm fine with this.

@ian28223 ian28223 merged commit 05fc98a into master Feb 5, 2021
@ian28223 ian28223 deleted the ian.bucad/test_refresh_beans branch February 5, 2021 00:32
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