[tests] increase timeouts in sendheaders test #10365

pull jnewbery wants to merge 2 commits into bitcoin:master from jnewbery:improve_sendheaders changing 2 files +10 −8
  1. jnewbery commented at 9:21 PM on May 8, 2017: member

    Increases short timeouts in the sendheaders.py test, which were causing intermittent failure when there was disk i/o contention.

    We believe the root cause of this was that bitcoind log writes were excessively slow (up to several seconds) when another test was running in parallel and shutdown the node. The wallet flush on shutdown can block disk i/o for several seconds.

    Longer term, it may be worth thinking about changing bitcoind LogPrints to write to a circular buffer and have a background thread write from there to disk. For now, let's just make this test less flakey. @sdaftuar

  2. instagibbs commented at 9:35 PM on May 8, 2017: member

    nitting: could you set a constant to that value instead of hunting and pecking for the number in case it changes again?

  3. jnewbery commented at 10:14 PM on May 8, 2017: member

    @instagibbs good point. wait_until() currently defaults to having no timeout. I can't see how that's useful - we'd want any timed predicate to eventually time out and fail the test. I propose we change wait_until() to have a 60 second timeout by default, and then remove the timeout parameter from almost all calls to wait_until() Definition is here: https://github.com/bitcoin/bitcoin/blob/master/test/functional/test_framework/mininode.py#L1360 @sdaftuar @MarcoFalke - thoughts?

  4. fanquake added the label Tests on May 8, 2017
  5. sdaftuar commented at 12:32 AM on May 9, 2017: member

    @jnewbery Makes sense to me; I actually thought we already had a 60 second default and was going to suggest just using that when I saw @instagibbs' comment!

  6. [tests] Make wait_until timeout 60 seconds by default b0bfa233a1
  7. [tests] increase timeouts in sendheaders test 56befa03ac
  8. jnewbery force-pushed on May 9, 2017
  9. jnewbery commented at 1:13 PM on May 9, 2017: member

    Updated wait_until() to have a default timeout of 60 seconds and removes the explicit timeouts from sendheaders.py

  10. MarcoFalke commented at 1:42 PM on May 9, 2017: member

    utACK 56befa0

  11. TheBlueMatt commented at 2:25 PM on May 9, 2017: member

    utACK 56befa03ac559ddab95eac4c2167b586dc0d01b9 though it might be nice to default the timeout in wait_for_* to float('inf') instead of 60 as well.

  12. jnewbery commented at 3:33 PM on May 9, 2017: member

    it might be nice to default the timeout in wait_for_* to float('inf') instead of 60

    Which wait_for_ functions are you referring to? The ones in sendheader.py or in mininode.py? Why is changing the default to float('inf') better?

  13. MarcoFalke merged this on May 9, 2017
  14. MarcoFalke closed this on May 9, 2017

  15. MarcoFalke referenced this in commit 7ee5236048 on May 9, 2017
  16. jnewbery deleted the branch on May 9, 2017
  17. codablock referenced this in commit 04b818c3b2 on Dec 31, 2018
  18. codablock referenced this in commit 75024e1173 on Dec 31, 2018
  19. codablock referenced this in commit 119f1c9d6f on Jan 2, 2019
  20. MarcoFalke 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-30 12:15 UTC

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