-
Notifications
You must be signed in to change notification settings - Fork 73
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
Made snapshot test more robust in case of asap scheduling #1274
Conversation
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.
Should this also be fixed in 4.0? If so, do 4.0 first. Then merge into main.
|
I got confused, sorry @linh2931. In 4.0 no changes needed, since this particular test, which was flaky, was added here: |
tests/test_snapshot_scheduler.cpp
Outdated
BOOST_CHECK(block_num==pbn || ((block_num+1)==pbn)); | ||
|
||
// first pending snapshot | ||
auto ps_start = spacing ? (spacing + (pbn%spacing)) : pbn; |
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.
As spacing
is used in modular division pbn%spacing
, it is more readable
auto ps_start = (spacing != 0) ? (spacing + (pbn%spacing)) : pbn;
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.
Done, thank you!
This PR addresses instability of snapshot scheduler test and specifically it's part that executes "asap" scheduling with no start block.