HomePhabricator

Clear mock time between tests

Description

Clear mock time between tests

Summary:
The mock time is a global that will affect all subsequent tests, and is
sometime reset manually at the end of a test case and sometime is not.
This diff resets it at fixture creation time to ensure the tests are
run with their own independent mock time, or current time by default.
Also removes the now useless manual resets.

Test Plan:

ninja check

Because ninja check runs test_bitcoin instances in parallel it can
mask the issue:

./src/test/test_bitcoin

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

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

Details

Provenance
FabienAuthored on May 4 2020, 14:14
FabienPushed on May 4 2020, 14:48
Reviewer
Restricted Project
Differential Revision
D5949: Clear mock time between tests
Parents
rABCe04b854d9b73: [rpc] mining: Omit uninitialized currentblockweight, currentblocktx
Branches
Unknown
Tags
Unknown