New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from May 20, 2016

Conversation

Projects
None yet
3 participants
@MarcoFalke
Member

MarcoFalke commented May 12, 2016

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

@MarcoFalke MarcoFalke added the Tests label May 12, 2016

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj 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?

Member

laanwj commented May 12, 2016

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

@MarcoFalke

This comment has been minimized.

Show comment
Hide comment
@MarcoFalke

MarcoFalke 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.

Member

MarcoFalke commented May 12, 2016

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.

@jtimon

This comment has been minimized.

Show comment
Hide comment
@jtimon

jtimon May 20, 2016

Member

utACK fab5233

Member

jtimon commented May 20, 2016

utACK fab5233

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj May 20, 2016

Member

Oops forgot about this
utACK fab5233

Member

laanwj commented May 20, 2016

Oops forgot about this
utACK fab5233

@MarcoFalke MarcoFalke merged commit fab5233 into bitcoin:master May 20, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

MarcoFalke added a commit that referenced this pull request May 20, 2016

Merge #8047: [qa] test_framework: Set wait-timeout for bitcoind procs
fab5233 [qa] test_framework: Set wait-timeout for bitcoind procs (MarcoFalke)

@MarcoFalke MarcoFalke deleted the MarcoFalke:Mf1605-qaUtilTimeout branch May 20, 2016

codablock added a commit to codablock/dash that referenced this pull request Sep 16, 2017

Merge bitcoin#8047: [qa] test_framework: Set wait-timeout for bitcoin…
…d procs

fab5233 [qa] test_framework: Set wait-timeout for bitcoind procs (MarcoFalke)

codablock added a commit to codablock/dash that referenced this pull request Sep 19, 2017

Merge bitcoin#8047: [qa] test_framework: Set wait-timeout for bitcoin…
…d procs

fab5233 [qa] test_framework: Set wait-timeout for bitcoind procs (MarcoFalke)

codablock added a commit to codablock/dash that referenced this pull request Dec 21, 2017

Merge bitcoin#8047: [qa] test_framework: Set wait-timeout for bitcoin…
…d procs

fab5233 [qa] test_framework: Set wait-timeout for bitcoind procs (MarcoFalke)

@dagurval dagurval referenced this pull request Feb 1, 2018

Merged

QA cherries #319

sickpig added a commit to sickpig/BitcoinUnlimited that referenced this pull request Mar 12, 2018

Partial port of XT PR BitcoinUnlimited#319 from dagurval/qa-cherries
Core QA cherries

bitcoin/bitcoin#8047 - [qa] test_framework: Set wait-timeout for bitcoind procs
bitcoin/bitcoin#8095 - Test framework: only cleanup on successful test runs
bitcoin/bitcoin#8214 - [qa] mininode: fail on send_message instead of silent return

@sickpig sickpig referenced this pull request Mar 12, 2018

Merged

QA Core ports #1006

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment