aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_runner.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2017-06-18 14:13:50 +0200
committerMarcoFalke <falke.marco@gmail.com>2017-06-18 14:14:25 +0200
commit643fa0b22d70e459d7f7ec3d728ae4811dc5158f (patch)
treeae0444acc1dd0cd932cfa28c3401a16d061b0b28 /test/functional/test_runner.py
parente053e05c130549f43953f1d70e724dc9ce3e1b85 (diff)
parent0a4912e46aecef6f04c6287508020ec60424ed24 (diff)
downloadbitcoin-643fa0b22d70e459d7f7ec3d728ae4811dc5158f.tar.xz
Merge #10555: [tests] various improvements to zmq_test.py
0a4912e [tests] timeout integration tests on travis after 20 minutes (John Newbery) 7c51e9f [tests] destroy zmq context in zmq_tests.py (John Newbery) b1bac1c [tests] in zmq test, timeout if message not received (John Newbery) 5ebd5f9 [tests] tidy up zmq_test.py (John Newbery) 4a0c08f [tests] update zmq test to use correct config.ini file (John Newbery) Tree-SHA512: 5e607af2f2dc5c73fba4b2d3890097580a7525f6a4996c7c78f01822e45e0054fd0a225ea53fce6308804e560cced6de6cf5d16137469dcf100b2e9643e08d03
Diffstat (limited to 'test/functional/test_runner.py')
-rwxr-xr-xtest/functional/test_runner.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py
index c7de31510a..0dca318af8 100755
--- a/test/functional/test_runner.py
+++ b/test/functional/test_runner.py
@@ -20,6 +20,7 @@ import datetime
import os
import time
import shutil
+import signal
import sys
import subprocess
import tempfile
@@ -78,7 +79,7 @@ BASE_SCRIPTS= [
'rawtransactions.py',
'reindex.py',
# vv Tests less than 30s vv
- "zmq_test.py",
+ 'zmq_test.py',
'mempool_resurrect_test.py',
'txn_doublespend.py --mineblock',
'txn_clone.py',
@@ -390,6 +391,10 @@ class TestHandler:
time.sleep(.5)
for j in self.jobs:
(name, time0, proc, log_out, log_err) = j
+ if os.getenv('TRAVIS') == 'true' and int(time.time() - time0) > 20 * 60:
+ # In travis, timeout individual tests after 20 minutes (to stop tests hanging and not
+ # providing useful output.
+ proc.send_signal(signal.SIGINT)
if proc.poll() is not None:
log_out.seek(0), log_err.seek(0)
[stdout, stderr] = [l.read().decode('utf-8') for l in (log_out, log_err)]