-
Notifications
You must be signed in to change notification settings - Fork 38.7k
test: Bump walletpassphrase timeouts to avoid intermittent issues #28403
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
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
jonatack
left a comment
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.
Concept ACK
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.
Maybe move WALLET_PASSPHRASE_TIMEOUT in wallet_bumpfee.py to the framework and use that everywhere?
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.
Going to leave this as-is for now.
Happy to review an alternative that does this.
Even better would be to implement a Python with context manager that accepts a locked wallet, unlocks it "forever", then does the needed operations, and immediately re-locks it when done.
This should make tests less fragile and also easier to read, because it clarifies and enforces what operations the wallet needs to be unlocked for.
Though, again, I am not going to work on any of this, but I am happy to review anything in that regard.
test/functional/wallet_encryption.py
Outdated
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 at https://github.com/bitcoin/bitcoin/pull/28403/files#diff-6ab4bc75c6edb7e0afcc38ea1695080ea2ff04b3a581a2bf6f58c3e4c455fa22R50? (edit: some other sites also, it seems)
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.
Why? This is used to check the timeout arg. If it is modified, the test will fail, no?
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.
Perhaps the one on line 71? That one isn't testing the arg.
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.
Perhaps the one on line 71? That one isn't testing the arg.
Ah, thx, done.
Instead of 0, would it make sense if that arg was optional and if not specified then to treat it as "no timeout"? |
@kevkevinpal Sgtm. Do you want to work on this and create a pull? |
yea I can work on this, will open a pull when ready thanks! |
|
@MarcoFalke I created a PR #28454 I didnt modify any of the tests to not include a value, I'm not sure if you want to do that in this PR or I can do it in the one I opened |
|
Just ran into this again: |
faac104 to
fa28f5a
Compare
|
Force pushed to modify two more lines. Should be trivial to re-ACK. |
|
ACK fa28f5a |
…termittent issues
004903e test: Add Wallet Unlock Context Manager (Brandon Odiwuor) Pull request description: Fixes #28601, see bitcoin/bitcoin#28403 (comment) Add Context Manager to manage the locking and unlocking of locked wallets with a passphrase during testing. ACKs for top commit: kevkevinpal: lgtm ACK [004903e](bitcoin/bitcoin@004903e) maflcko: lgtm ACK 004903e Tree-SHA512: ab234c167e71531df0d974ff9a31d444f7ce2a1d05aba5ea868cc9452f139845eeb24ca058d88f058bc02482b762adf2d99e63a6640b872cc71a57a0068abfe8
This bumps all timeouts for all
walletpassphraseto avoid intermittent issues invalgrind(or other sanitizers).As an idea for a follow-up,
walletpassphrasecould be changed to treat0as "no timeout" instead of "instant timeout".Example failure: