Page MenuHomePhabricator

tests: remove flaky mocktime test
ClosedPublic

Authored by PiRK on Apr 9 2024, 10:39.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCb132af74fbce: tests: remove flaky mocktime test
Summary

This test is sometimes triggering an assertion on slow CI machines, because of an overflow. The issue can be reliably reproduced by adding a time.sleep(2) after this setmocktime call.

AssertionError: Unexpected stderr bitcoind: /home/pierre/dev/bitcoin-abc/src/util/time.cpp:78: static NodeClock::time_point NodeClock::now(): Assertion `ret > 0s' failed. !=

The maximum possible mocktime in seconds depends on each system, and is generally not max_int64. For instance on linux the time point is stored with nanoseconds precision, so the maximum would be max_int64 / 10^9.
See D15926 for an attempt to fix the issue (not trivial).

This diff just removes the flaky test and does not attempt to compute the actual allowable maximum that should be tested.

Test Plan

ninja check-functional

Diff Detail

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

Event Timeline

PiRK requested review of this revision.Apr 9 2024, 10:39
This revision is now accepted and ready to land.Apr 9 2024, 11:36
This revision was automatically updated to reflect the committed changes.