Since we switched to python3, it is now possible to set a timeout for Popen.wait(). 60 seconds should be enough to cleanly exit?
[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-
MarcoFalke commented at 11:14 AM on May 12, 2016: member
-
[qa] test_framework: Set wait-timeout for bitcoind procs fab5233fe6
- MarcoFalke added the label Tests on May 12, 2016
-
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?
-
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 $? 1Edit: 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.
-
jtimon commented at 1:10 PM on May 20, 2016: contributor
utACK fab5233
-
laanwj commented at 3:02 PM on May 20, 2016: member
Oops forgot about this utACK https://github.com/bitcoin/bitcoin/pull/8047/commits/fab5233fe6c99d446a2cebc48cf479c3f026c2cc
- MarcoFalke merged this on May 20, 2016
- MarcoFalke closed this on May 20, 2016
- MarcoFalke referenced this in commit 37f9a1f627 on May 20, 2016
- MarcoFalke deleted the branch on May 20, 2016
- codablock referenced this in commit 97b2077adb on Sep 16, 2017
- codablock referenced this in commit d475234358 on Sep 19, 2017
- codablock referenced this in commit 62aaaaeac0 on Dec 21, 2017
- sickpig referenced this in commit 101c642563 on Mar 9, 2018
- sickpig referenced this in commit a889a3d9a3 on Mar 9, 2018
- sickpig referenced this in commit ed5b5eac84 on Mar 12, 2018
- sickpig referenced this in commit 4f85eca0f9 on Mar 12, 2018
- sickpig referenced this in commit c30f7fcaa7 on Mar 12, 2018
- sickpig referenced this in commit 40bc0128d2 on Mar 12, 2018
- sickpig referenced this in commit 330553f4a5 on Mar 12, 2018
- DrahtBot locked this on Sep 8, 2021
Contributors
Labels