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.
tests: p2p_timeouts should be rewritten with mocktime #13518
issue MarcoFalke opened this issue on June 21, 2018-
MarcoFalke commented at 1:58 PM on June 21, 2018: member
- MarcoFalke added the label Tests on Jun 21, 2018
- MarcoFalke added the label good first issue on Jun 21, 2018
-
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.
-
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. - MarcoFalke removed the label good first issue on Nov 16, 2018
- laanwj referenced this in commit 88445889f1 on Dec 4, 2018
- MarcoFalke closed this on Dec 6, 2018
- PastaPastaPasta referenced this in commit 987aa99056 on Apr 16, 2020
- PastaPastaPasta referenced this in commit d5156982ef on Apr 16, 2020
- PastaPastaPasta referenced this in commit 3f36c51de2 on Apr 19, 2020
- PastaPastaPasta referenced this in commit 29eada80a7 on Apr 20, 2020
- PastaPastaPasta referenced this in commit feb0c4949b on Jun 12, 2020
- PastaPastaPasta referenced this in commit f40d8f006b on Jun 14, 2020
- DrahtBot locked this on Sep 8, 2021