test: fix intermittent failure in p2p_seednode.py, don’t connect to random IPs #31142

pull mzumsande wants to merge 2 commits into bitcoin:master from mzumsande:202410_seednode_error changing 1 files +9 −7
  1. mzumsande commented at 7:29 pm on October 23, 2024: contributor

    Fixes #31103

    On some CI runs, the seed node timer in ThreadOpenConnection was only started after the mocktime was set. Fix this by waiting for the first connection attempt, which happens after the timer was started.

    Also I noticed that the “unreachable” connections are not in fact unreachable, so that the functional test could attempt connections to random IPs on the internet. This was already noted in #29605 (review) but the suggested fix never made it in, so I added it to this PR.

  2. DrahtBot commented at 7:29 pm on October 23, 2024: contributor

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

    Code Coverage

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

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK laanwj, tdb3, sr-gi

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

  3. DrahtBot added the label Tests on Oct 23, 2024
  4. test: fix intermittent timeout in p2p_seednodes.py
    On some CI runs, the timer in ThreadOpenConnection was only started *after*
    the mocktime was set. Fix this by waiting for the first connection attempt,
    which happens after the timer was started.
    
    Also convert some comments into log messages/add a log, so that the test
    isn't completely silent.
    bb97b1ffa9
  5. test: Prevent connection attempts to random IPs in p2p_seednodes.py
    These addrs aren't unreachable as the test claims.
    Specify a (non-working) proxy to make sure the connections fails
    even if the addr was reachable.
    
    Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
    6c9fe7b73e
  6. mzumsande force-pushed on Oct 23, 2024
  7. laanwj approved
  8. laanwj commented at 9:59 am on October 24, 2024: member
    Code review ACK 6c9fe7b73ea1572b8b56c716ab13d9866f91c6e9
  9. maflcko requested review from vasild on Oct 24, 2024
  10. maflcko requested review from sr-gi on Oct 24, 2024
  11. tdb3 approved
  12. tdb3 commented at 12:24 pm on October 28, 2024: contributor

    cr and light test ACK 6c9fe7b73ea1572b8b56c716ab13d9866f91c6e9

    Nice addition of the non-working proxy.

  13. sr-gi commented at 3:31 pm on October 28, 2024: member
    tACK 6c9fe7b
  14. fanquake merged this on Oct 28, 2024
  15. fanquake closed this on Oct 28, 2024

  16. mzumsande deleted the branch on Oct 28, 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: 2024-11-21 09:12 UTC

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