test: use monotonic clock for durations in test framework and http_interface #36731

pull ViniciusCestarii wants to merge 2 commits into bitcoin:master from ViniciusCestarii:test-framework-monotonic changing 6 files +20 −20
  1. ViniciusCestarii commented at 1:06 PM on November 2, 2026: contributor

    Replace time.time() used to measure durations by time.monotonic() in test framework and http_interface.

    This helps preventing future clock jump flakiness (same class of bug as #36529) on tests and fix:

    faketime --exclude-monotonic -f "+0 x0.5" build/test/functional/feature_torcontrol.py
    faketime --exclude-monotonic -f "+0 x0.1" build/test/functional/interface_http.py
    
  2. test: use monotonic clock for durations in test framework eccca10e64
  3. test: use monotonic clock in interface_http a7d3a42973
  4. DrahtBot added the label Tests on Nov 2, 2026
  5. DrahtBot commented at 1:06 PM on November 2, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    ACK nervana21, maflcko, sedited

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  6. nervana21 commented at 4:03 PM on November 2, 2026: contributor
  7. nervana21 commented at 2:43 AM on November 6, 2026: contributor

    tACK a7d3a4297321274ced64294e0bbd3252167e8879

    I used a method similar to OP's and got the same results.

    Could we also fix interface_ipc_mining? I think it has the same class of bug.

  8. maflcko commented at 7:58 AM on November 6, 2026: member

    review ACK a7d3a4297321274ced64294e0bbd3252167e8879 🕐

    <details><summary>Show signature</summary>

    Signature:

    untrusted comment: signature from minisign secret key on empty file; verify via: minisign -Vm "${path_to_any_empty_file}" -P RWTRmVTMeKV5noAMqVlsMugDDCyyTSbA3Re5AkUrhvLVln0tSaFWglOw -x "${path_to_this_whole_four_line_signature_blob}"
    RUTRmVTMeKV5npGrKx1nqXCw5zeVHdtdYURB/KlyA/LMFgpNCs+SkW9a8N95d+U4AP1RJMi+krxU1A3Yux4bpwZNLvVBKy0wLgM=
    trusted comment: review ACK a7d3a4297321274ced64294e0bbd3252167e8879 🕐
    puDsm8LL3f0RXsyvtA9LpCAai3+CTZRm7473NZhf3jtadtINbCd5JGfKcZ+zizcOnvTT2SnPoKs9piiKTWnIDA==
    

    </details>

  9. sedited approved
  10. sedited commented at 10:03 AM on November 6, 2026: contributor

    ACK a7d3a4297321274ced64294e0bbd3252167e8879

  11. sedited merged this on Nov 6, 2026
  12. sedited closed this on Nov 6, 2026


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-11-10 20:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me