HomePhabricator

QA: Fix race condition in wallet_encryption test

Description

QA: Fix race condition in wallet_encryption test

Summary:

There is some imprecision probably in the internal HTTPRPCTimer class
(haven't exactly figured out where).
But we can't expect that waiting exactly 2 seconds right after calling
walletpassphrase(2) will result in a locked wallet due to the nature how
we internally handle threads/timers.

The wallet_encryption test fails regularly in CIs.

Backport of core PR16420
https://github.com/bitcoin/bitcoin/pull/16420/files

Test Plan:

for i in {1..100}
do
  ./test/functional/test_runner.py wallet_encryption
done

Reviewers: #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D3702

Details

Provenance
Jonas Schnelli <dev@jonasschnelli.ch>Authored on Jul 18 2019, 20:12
FabienCommitted on Jul 22 2019, 15:08
FabienPushed on Jul 22 2019, 15:08
Reviewer
Restricted Project
Differential Revision
D3702: QA: Fix race condition in wallet_encryption test
Parents
rABC958bce8e47cb: [tests] [qt] Add tests for address book manipulation via EditAddressDialog
Branches
Unknown
Tags
Unknown