Page MenuHomePhabricator

Clear mock time between tests
ClosedPublic

Authored by Fabien on May 4 2020, 14:28.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.May 4 2020, 14:38
This revision is now accepted and ready to land.May 4 2020, 14:40
This revision was automatically updated to reflect the committed changes.