test: fix intermittent error in rpc_net.py (#29030) #29041

pull theStack wants to merge 1 commits into bitcoin:master from theStack:202312-test-fix_intermittent_error_in_rpc_net changing 1 files +1 −1
  1. theStack commented at 12:32 PM on December 9, 2023: contributor

    Asserting for the debug log message "Added connection peer=" is insufficient for ensuring that this new connection will show up in a following getpeerinfo() call, as the debug message is written in the CNode ctor, which means it hasn't necessarily been added to CConnman.m_nodes at this point.

    Solve this by using the recently introduced wait_for_new_peer helper (see #29006, commit 00e0658e77f66103ebdeb29def99dc9f937c049d), which is more robust.

    Fixes #29030.

  2. test: fix intermittent error in rpc_net.py (#29030)
    Asserting for the debug log message "Added connection peer=" is
    insufficient for ensuring that this new connection will show up in a
    following getpeerinfo() call, as the debug message is written in the
    CNode ctor, which means it hasn't necessarily been added to
    CConnman.m_nodes at this point.
    
    Solve this by using the recently introduced `wait_for_new_peer`
    helper, which is more robust.
    
    Fixes #29030.
    ea00f982d2
  3. DrahtBot commented at 12:32 PM on December 9, 2023: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK maflcko

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  4. DrahtBot added the label Tests on Dec 9, 2023
  5. maflcko commented at 12:35 PM on December 9, 2023: member

    lgtm ACK ea00f982d21aab51001d422225f00626a74db298

  6. fanquake merged this on Dec 11, 2023
  7. fanquake closed this on Dec 11, 2023

  8. theStack deleted the branch on Dec 11, 2023
  9. bitcoin locked this on Dec 10, 2024

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-04-14 21:13 UTC

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