test: Avoid hard time.sleep(1) in feature_init.py #34137

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2512-test-less-hard-sleep changing 1 files +8 −2
  1. maflcko commented at 1:46 pm on December 22, 2025: member

    Using a hard-coded time.sleep in the tests is usually confusing and brittle. For example, the one in break_wait_test:

    • Is confusing, because it does not explain why it is needed.
    • On fast hardware will just lead to a useless delay.
    • On slow hardware may lead to an intermittent, and confusing test failure.

    Fix all issues by replacing it with the proper condition to wait on.

  2. DrahtBot added the label Tests on Dec 22, 2025
  3. DrahtBot commented at 1:46 pm on December 22, 2025: contributor

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

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/34137.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

  4. test: Avoid hard time.sleep(1) in feature_init.py fa5082a650
  5. maflcko force-pushed on Dec 22, 2025
  6. DrahtBot added the label CI failed on Dec 22, 2025
  7. DrahtBot commented at 1:54 pm on December 22, 2025: contributor

    🚧 At least one of the CI tasks failed. Task lint: https://github.com/bitcoin/bitcoin/actions/runs/20433712257/job/58709973844 LLM reason (✨ experimental): Lint Python code failed due to unused import (time) in test/functional/feature_init.py, causing lint check to exit with error.

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

  8. DrahtBot removed the label CI failed on Dec 22, 2025


maflcko DrahtBot

Labels
Tests


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: 2025-12-23 03:13 UTC

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