-
Notifications
You must be signed in to change notification settings - Fork 890
chore: Use standardized test timeouts and delays #3291
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
Conversation
// constants for timeouts and delays in usual scenarios, this allows us | ||
// to tweak them based on platform (important to avoid CI flakes). | ||
//nolint:unused,deadcode,varnamelen | ||
func useStandardTimeoutsAndDelaysInTests(m dsl.Matcher) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Nice!
1d55b5d
to
995de74
Compare
995de74
to
87432e6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just have a small question, but this is an awesome PR! 🔥
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a fan of testtime
or testdir
more.
util
packages expand infinitely, I'm convinced!
I moved the |
563138e
to
422e72b
Compare
This PR introduces a new package called
testutil
for exposing standard delays and intervals that can be used in tests.This is so that we can increase or decrease the values depending on platform.
The motivation behind this PR is that Windows tests are flaking due to timeouts, not that they failed to complete.
Motivation behind putting this package in
internal
can be found in #1405.PS. I'm not married to the name, I tried floating a few different ideas in my mind:
But I didn't really like any of them. I consider this package something we will expand in the future.