tests: p2p_timeouts should be rewritten with mocktime #13518

issue MarcoFalke opened this issue on June 21, 2018
  1. MarcoFalke commented at 1:58 PM on June 21, 2018: member

    The p2p_timeouts functional test should probably be rewritten to use mocktime. Currently it spends all of its time in various time.sleep(30) and takes more than a minute to finish for a trivial test.

  2. MarcoFalke added the label Tests on Jun 21, 2018
  3. MarcoFalke added the label good first issue on Jun 21, 2018
  4. jnewbery commented at 2:39 PM on June 21, 2018: member

    Qualified concept ACK.

    It's annoying that this test takes a minute to run, but taking a shortcut using mocktime places assumptions on how the bitcoind node is looping its connections and disconnecting misbehaving peers.

    If we're not careful in the way we change this test and the implementation changes in bitcoind, this test could cease to be actually testing anything.

  5. MarcoFalke commented at 2:54 PM on June 21, 2018: member

    Thanks for the input. If the time.sleep() are required for some reason, it should be explained in the test why.

  6. MarcoFalke removed the label good first issue on Nov 16, 2018
  7. laanwj referenced this in commit 88445889f1 on Dec 4, 2018
  8. MarcoFalke closed this on Dec 6, 2018

  9. PastaPastaPasta referenced this in commit 987aa99056 on Apr 16, 2020
  10. PastaPastaPasta referenced this in commit d5156982ef on Apr 16, 2020
  11. PastaPastaPasta referenced this in commit 3f36c51de2 on Apr 19, 2020
  12. PastaPastaPasta referenced this in commit 29eada80a7 on Apr 20, 2020
  13. PastaPastaPasta referenced this in commit feb0c4949b on Jun 12, 2020
  14. PastaPastaPasta referenced this in commit f40d8f006b on Jun 14, 2020
  15. DrahtBot locked this on Sep 8, 2021

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-17 06:15 UTC

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