-
Notifications
You must be signed in to change notification settings - Fork 261
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
relax measure macros test check #3517
Conversation
ngl I hate time/sleep in tests in general. do these actually add value? why not just make sure the time is non-zero i.e. there is some time passing? |
I'm not opposed to that. I guess the only thing we'd be missing is sanity checking that measure's time keeping somewhat matches reality. Looks like we are just using |
I think it's unlikely we move away from |
@apfitzge it is done |
🪦 sorry. Can we not wait for so long now? Just sleep for a few mics and then assert it's not 0. No need to make the test a whole second now |
You're the worst. Shortened to 1ms |
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.
Change the PR title and we're good to go
Problem
These tests rely on threads sleeping for a specific amount of time. This is dubious in general given how these sleeps work:
There is a 1% margin that is added for waking up late. This seems to be sufficient in most cases, but I've seen failures: https://buildkite.com/anza/agave/builds/13456#019303ec-ef7e-444c-bb01-3060b863270b
I noticed these tests are not marked to run in serial, so I'm assuming there is the possibility of other tests running and increasing the likelihood of threads sleeping beyond the specified limit.
Also, the assert message does not indicate what the actual time was, which is less than ideal for debugging:
Summary of Changes