[qa] test_framework: Set wait-timeout for bitcoind procs #8047

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:Mf1605-qaUtilTimeout changing 1 files +4 −2
  1. MarcoFalke commented at 11:14 AM on May 12, 2016: member

    Since we switched to python3, it is now possible to set a timeout for Popen.wait(). 60 seconds should be enough to cleanly exit?

  2. [qa] test_framework: Set wait-timeout for bitcoind procs fab5233fe6
  3. MarcoFalke added the label Tests on May 12, 2016
  4. laanwj commented at 11:46 AM on May 12, 2016: member

    Concept ACK, this avoids an infinite wait / travis timeout. What happens if the deadline is not met? Is there a clear exception?

  5. MarcoFalke commented at 12:11 PM on May 12, 2016: member

    Depends on how you run the tests:

    • Running them directly will give you:
    subprocess.TimeoutExpired: Command '['bitcoind', '-datadir=/tmp/testh6waqi5c/node0', '-server']' timed out after 60 seconds
    $ echo $?
    1
    
    • Running them through the wrapper gives:
    subprocess.TimeoutExpired: Command '['/home/marco/workspace/bitcoin/qa/rpc-tests/walletbackup.py', '--srcdir=/home/marco/workspace/bitcoin/src', '--portseed=0']' timed out after 3 seconds
    $ echo $?
    1
    

    Edit: For the wrapper: As there is no traceback printed (of the actual timeout in the python test), one could add a help message to the wrapper saying something like: "Some processes may be still running. Make sure to kill any bitcoind subprocesses before running further tests. To inspect the traceback, run the command mentioned above in the TimeoutExpired Exception from your command line." But I consider this out of scope for this pull.

  6. jtimon commented at 1:10 PM on May 20, 2016: contributor

    utACK fab5233

  7. laanwj commented at 3:02 PM on May 20, 2016: member
  8. MarcoFalke merged this on May 20, 2016
  9. MarcoFalke closed this on May 20, 2016

  10. MarcoFalke referenced this in commit 37f9a1f627 on May 20, 2016
  11. MarcoFalke deleted the branch on May 20, 2016
  12. codablock referenced this in commit 97b2077adb on Sep 16, 2017
  13. codablock referenced this in commit d475234358 on Sep 19, 2017
  14. codablock referenced this in commit 62aaaaeac0 on Dec 21, 2017
  15. sickpig referenced this in commit 101c642563 on Mar 9, 2018
  16. sickpig referenced this in commit a889a3d9a3 on Mar 9, 2018
  17. sickpig referenced this in commit ed5b5eac84 on Mar 12, 2018
  18. sickpig referenced this in commit 4f85eca0f9 on Mar 12, 2018
  19. sickpig referenced this in commit c30f7fcaa7 on Mar 12, 2018
  20. sickpig referenced this in commit 40bc0128d2 on Mar 12, 2018
  21. sickpig referenced this in commit 330553f4a5 on Mar 12, 2018
  22. DrahtBot locked this on Sep 8, 2021
Labels

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