-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Fix versionbits warning test #12264
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
Fix versionbits warning test #12264
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 say more than 50, not less than
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.
Thanks, fixed
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.
nit: 60 seconds seems overkill, what about 5 or 10?
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.
no harm in having it longer
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 sometimes make tests fail on purpose, so having to wait a minute (or going into the test each time and having to modify it) is somewhat inconvenient.
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.
Also, should the test fail for some reason, the earlier you know the better. As a rule of thumb, I estimate the time it would take to fulfill the predicate, double that for travis, then double again just to be safe.
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.
You can change the timeout on your failure-triggering case 🙂
In my opinion it's better to have this too long than too short, to avoid spurious Travis failures.
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 also prefer waiting on the long side, if it doesn't slow down the test in the passing case. Travis can be really slow when the servers are contended.
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.
Generating that block will not help to get us out of ibd any sooner. Am I mistaken?
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.
generating a block guarantees that we'll get out of IBD. I've updated the comment.
|
Concept ACK |
9100159 to
f36607e
Compare
|
Seems to need rebase (already?). |
|
utACK f36607eb8c Needs rebase |
Makes following changes to fix and tidy up p2p-versionbits-warning.py: - add node alias in the run() method - call versionbits_in_alert_file() in a wait_until loop. - don't clear out the alert.txt file - explicitly comment why the node needs to be stop-started - Verify that the node is out of IBD after stop-start (nodes in IBD do not generate alert messages) - no need to subclass P2PInterface
f36607e to
1e2e09e
Compare
|
rebased (test file name change) |
1e2e09e Fix intermittent failure in p2p-versionbits-warning.py (John Newbery) 3bbd843 Improve comments/logging in p2p-versionbits-warning.py (John Newbery) ef2beb2 Fix flake8 warnings in p2p-versionbits-warning.py (John Newbery) Pull request description: fixes #12259 (and tidies up the test) The problem was that the node was still in IBD at the point the last block was generated. UpdateTip() will not generate a warning if the node is still in IBD: https://github.com/bitcoin/bitcoin/blob/cc5870a4057f0322509dde5877fb08258bf4ec50/src/validation.cpp#L2151 The 'proper' fix would be to remove the overenthusiastic latching in DoWarning: https://github.com/bitcoin/bitcoin/blob/cc5870a4057f0322509dde5877fb08258bf4ec50/src/validation.cpp#L2135 so that more than one warning message can be output to `alertnotify`. Really we should suppress multiple messages of the same type, but allow messages to be output if they're for different warnings. That would mean the test wouldn't need to stop-start the node. Tree-SHA512: 5c9aa5af7eba3c1350ea28482d57d3d79e3166c6224ceddb5d5a631090081d890d7403015e41f413c22990959a488cf1231f88bb825c54a609b24f89c450a1f6
* Wait a little bit longer in wallet-encryption.py The timed wallet locking is happening by an asynchronous task internally, which means that it might need a little bit longer then the specified timeout. * Add workaround for p2p-versionbits-warnings.py until we backport bitcoin#12264
* Wait a little bit longer in wallet-encryption.py The timed wallet locking is happening by an asynchronous task internally, which means that it might need a little bit longer then the specified timeout. * Add workaround for p2p-versionbits-warnings.py until we backport bitcoin#12264
1e2e09e Fix intermittent failure in p2p-versionbits-warning.py (John Newbery) 3bbd843 Improve comments/logging in p2p-versionbits-warning.py (John Newbery) ef2beb2 Fix flake8 warnings in p2p-versionbits-warning.py (John Newbery) Pull request description: fixes bitcoin#12259 (and tidies up the test) The problem was that the node was still in IBD at the point the last block was generated. UpdateTip() will not generate a warning if the node is still in IBD: https://github.com/bitcoin/bitcoin/blob/cc5870a4057f0322509dde5877fb08258bf4ec50/src/validation.cpp#L2151 The 'proper' fix would be to remove the overenthusiastic latching in DoWarning: https://github.com/bitcoin/bitcoin/blob/cc5870a4057f0322509dde5877fb08258bf4ec50/src/validation.cpp#L2135 so that more than one warning message can be output to `alertnotify`. Really we should suppress multiple messages of the same type, but allow messages to be output if they're for different warnings. That would mean the test wouldn't need to stop-start the node. Tree-SHA512: 5c9aa5af7eba3c1350ea28482d57d3d79e3166c6224ceddb5d5a631090081d890d7403015e41f413c22990959a488cf1231f88bb825c54a609b24f89c450a1f6
* Wait a little bit longer in wallet-encryption.py The timed wallet locking is happening by an asynchronous task internally, which means that it might need a little bit longer then the specified timeout. * Add workaround for p2p-versionbits-warnings.py until we backport bitcoin#12264 Signed-off-by: cevap <[email protected]>
fixes #12259 (and tidies up the test)
The problem was that the node was still in IBD at the point the last block was generated. UpdateTip() will not generate a warning if the node is still in IBD:
bitcoin/src/validation.cpp
Line 2151 in cc5870a
The 'proper' fix would be to remove the overenthusiastic latching in DoWarning:
bitcoin/src/validation.cpp
Line 2135 in cc5870a
so that more than one warning message can be output to
alertnotify. Really we should suppress multiple messages of the same type, but allow messages to be output if they're for different warnings. That would mean the test wouldn't need to stop-start the node.