Skip to content

Commit 37f9a1f

Browse files
author
MarcoFalke
committed
Merge #8047: [qa] test_framework: Set wait-timeout for bitcoind procs
fab5233 [qa] test_framework: Set wait-timeout for bitcoind procs (MarcoFalke)
2 parents 8844ef1 + fab5233 commit 37f9a1f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

qa/rpc-tests/test_framework/util.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
# The number of ports to "reserve" for p2p and rpc, each
3636
PORT_RANGE = 5000
3737

38+
BITCOIND_PROC_WAIT_TIMEOUT = 60
39+
3840

3941
class PortSeed:
4042
# Must be initialized with a unique integer for each process
@@ -332,7 +334,7 @@ def stop_node(node, i):
332334
node.stop()
333335
except http.client.CannotSendRequest as e:
334336
print("WARN: Unable to stop node: " + repr(e))
335-
bitcoind_processes[i].wait()
337+
bitcoind_processes[i].wait(timeout=BITCOIND_PROC_WAIT_TIMEOUT)
336338
del bitcoind_processes[i]
337339

338340
def stop_nodes(nodes):
@@ -350,7 +352,7 @@ def set_node_times(nodes, t):
350352
def wait_bitcoinds():
351353
# Wait for all bitcoinds to cleanly exit
352354
for bitcoind in bitcoind_processes.values():
353-
bitcoind.wait()
355+
bitcoind.wait(timeout=BITCOIND_PROC_WAIT_TIMEOUT)
354356
bitcoind_processes.clear()
355357

356358
def connect_nodes(from_connection, node_num):

0 commit comments

Comments
 (0)