Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

[qa] Test walletpassphrase timeout #7320

Merged
merged 1 commit into from Jan 18, 2016

Conversation

Projects
None yet
4 participants
Member

MarcoFalke commented Jan 8, 2016

Test case for #7316

Test code: $ git checkout fadceb7;make;BITCOIND=bitcoin-qt qa/pull-tester/rpc-tests.py keypool

...
Running testscript keypool.py ...
Initializing test directory /tmp/testqf3QO4
Assertion failed: 1452255264 != 0
Member

jonasschnelli commented Jan 8, 2016

Nice!
utACK.

But this actually does not test the issue #7316, because the reported issue can only happen when you run bitcoin-qt with -server=1.

Member

MarcoFalke commented Jan 8, 2016

@jonasschnelli See my "test code" ;)

Are you still working on the BITCOIND=bitcoin-qt nightly rpc tests?

Member

jonasschnelli commented Jan 8, 2016

@MarcoFalke: Ah. Right. Your testcode looks good. Indeed, this would catch #7316.

Are you still working on the BITCOIND=bitcoin-qt nightly rpc tests?

It's relatively far down on my priority list. But not given up...

@laanwj laanwj commented on an outdated diff Jan 9, 2016

qa/rpc-tests/keypool.py
nodes[0].keypoolrefill(3)
- nodes[0].walletlock()
+ # test walletpassphrase timeout
+ time.sleep(1)
@laanwj

laanwj Jan 9, 2016

Owner

Concept ACK, but setting a timeout of 1 and then waiting a second is too close. A slight mistiming (e.g. busy machine) would result in a race condition, what about waiting 2 seconds instead?

@luke-jr luke-jr commented on the diff Jan 15, 2016

qa/rpc-tests/keypool.py
nodes[0].keypoolrefill(3)
- nodes[0].walletlock()
+ # test walletpassphrase timeout
+ time.sleep(1.1)
+ assert_equal(nodes[0].getwalletinfo()["unlocked_until"], 0)
@luke-jr

luke-jr Jan 15, 2016

Member

Maybe this ought to actually try to do something to test the wallet relocking?

@laanwj laanwj merged commit fa1cb1a into bitcoin:master Jan 18, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Jan 18, 2016

Merge pull request #7320
fa1cb1a [qa] Test walletpassphrase timeout (MarcoFalke)

@MarcoFalke MarcoFalke deleted the MarcoFalke:Mf1601-rpcWalletPass branch Jan 18, 2016

luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Feb 12, 2016

MarcoFalke added a commit to MarcoFalke/bitcoin that referenced this pull request Apr 5, 2016

zander added a commit to zander/bitcoinclassic that referenced this pull request Jun 16, 2016

nomnombtc added a commit to nomnombtc/bitcoin that referenced this pull request Nov 11, 2016

nomnombtc added a commit to nomnombtc/bitcoin that referenced this pull request Nov 12, 2016

nomnombtc added a commit to nomnombtc/bitcoin that referenced this pull request Nov 13, 2016

sickpig added a commit to sickpig/BitcoinUnlimited that referenced this pull request Nov 14, 2016

[qa] Test walletpassphrase timeout
Github-Pull: #7320
Rebased-From: fa1cb1a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment