Browse Source

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

fab5233 [qa] test_framework: Set wait-timeout for bitcoind procs (MarcoFalke)
0.13
MarcoFalke 8 years ago
parent
commit
37f9a1f627
No known key found for this signature in database
GPG Key ID: 2D7F2372E50FE137
  1. 6
      qa/rpc-tests/test_framework/util.py

6
qa/rpc-tests/test_framework/util.py

@ -35,6 +35,8 @@ PORT_MIN = 11000 @@ -35,6 +35,8 @@ PORT_MIN = 11000
# The number of ports to "reserve" for p2p and rpc, each
PORT_RANGE = 5000
BITCOIND_PROC_WAIT_TIMEOUT = 60
class PortSeed:
# Must be initialized with a unique integer for each process
@ -332,7 +334,7 @@ def stop_node(node, i): @@ -332,7 +334,7 @@ def stop_node(node, i):
node.stop()
except http.client.CannotSendRequest as e:
print("WARN: Unable to stop node: " + repr(e))
bitcoind_processes[i].wait()
bitcoind_processes[i].wait(timeout=BITCOIND_PROC_WAIT_TIMEOUT)
del bitcoind_processes[i]
def stop_nodes(nodes):
@ -350,7 +352,7 @@ def set_node_times(nodes, t): @@ -350,7 +352,7 @@ def set_node_times(nodes, t):
def wait_bitcoinds():
# Wait for all bitcoinds to cleanly exit
for bitcoind in bitcoind_processes.values():
bitcoind.wait()
bitcoind.wait(timeout=BITCOIND_PROC_WAIT_TIMEOUT)
bitcoind_processes.clear()
def connect_nodes(from_connection, node_num):

Loading…
Cancel
Save