Skip to content

Commit fab5233

Browse files
author
MarcoFalke
committed
[qa] test_framework: Set wait-timeout for bitcoind procs
1 parent 7c8558d commit fab5233

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
@@ -325,7 +327,7 @@ def stop_node(node, i):
325327
node.stop()
326328
except http.client.CannotSendRequest as e:
327329
print("WARN: Unable to stop node: " + repr(e))
328-
bitcoind_processes[i].wait()
330+
bitcoind_processes[i].wait(timeout=BITCOIND_PROC_WAIT_TIMEOUT)
329331
del bitcoind_processes[i]
330332

331333
def stop_nodes(nodes):
@@ -343,7 +345,7 @@ def set_node_times(nodes, t):
343345
def wait_bitcoinds():
344346
# Wait for all bitcoinds to cleanly exit
345347
for bitcoind in bitcoind_processes.values():
346-
bitcoind.wait()
348+
bitcoind.wait(timeout=BITCOIND_PROC_WAIT_TIMEOUT)
347349
bitcoind_processes.clear()
348350

349351
def connect_nodes(from_connection, node_num):

0 commit comments

Comments
 (0)