[test] Improvements to p2p_addr_relay.py #22306

pull amitiuttarwar wants to merge 5 commits into bitcoin:master from amitiuttarwar:2021-06-addr-tests changing 1 files +27 −28
  1. amitiuttarwar commented at 1:25 am on June 22, 2021: contributor

    A test refactor broken out from #21528 & a fix to #22243.

    This PR:

    1. consolidates the two helper classes into one, with the intent of making the test logic more clear & usable as we add more subtests to the file

    2. hopefully fixes the test flakiness by bumping up the mocktime interval to ensure m_next_addr_send timer triggers

  2. [test] Allow AddrReceiver to be used more generally
    The `on_addr` functionality of `AddrReceiver` tests logic specific to how the
    addr messages are set up in the test bodies. To allow other callers to also use
    `AddrReceiver`, only apply the assertion logic if the caller indicates
    desirability by setting `test_addr_contents` to true when initializing the
    class.
    09dc073cff
  3. [test] Add functionality to AddrReceiver
    Add two simple helper functions to `AddrReceiver` to support callers currently
    using `GetAddrStore` [used in next commit].
    e8c67ea19a
  4. [test] Update GetAddrStore callers to use AddrReceiver ef2f149bf2
  5. [test] Remove GetAddrStore class 1d8193e2a2
  6. [test] Prevent intermittent issue
    Since m_next_addr_send is on a Poisson distribution, increase the mocktime bump
    to ensure we don't experience flakiness in the tests. Closes #22243.
    6168eb06b2
  7. fanquake added the label Tests on Jun 22, 2021
  8. MarcoFalke added this to the milestone 22.0 on Jun 22, 2021
  9. lsilva01 approved
  10. lsilva01 commented at 6:07 pm on June 22, 2021: contributor
  11. brunoerg approved
  12. brunoerg commented at 7:18 pm on June 23, 2021: member

    tACK 6168eb06b2044f00f18727b955b672fc91c60bd7

    Ran test runner and p2p_addr_relay.py and passed (MacOS 11.3)

  13. mzumsande commented at 10:21 pm on June 23, 2021: member
    Code-Review ACK 6168eb06b2044f00f18727b955b672fc91c60bd7
  14. fanquake merged this on Jun 24, 2021
  15. fanquake closed this on Jun 24, 2021

  16. sidhujag referenced this in commit 5afcdfd836 on Jun 24, 2021
  17. fanquake referenced this in commit 06788c6705 on Aug 3, 2021
  18. Fabcien referenced this in commit c8c8603007 on Jan 21, 2022
  19. gwillen referenced this in commit 043b76e919 on Jun 1, 2022
  20. DrahtBot locked this on Aug 16, 2022

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-07-03 13:13 UTC

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