[qa] Stop other nodes, even when one fails to stop
This commit is contained in:
parent
065255d3cb
commit
5f13446dee
|
@ -16,6 +16,7 @@ from binascii import hexlify, unhexlify
|
|||
from base64 import b64encode
|
||||
from decimal import Decimal, ROUND_DOWN
|
||||
import json
|
||||
import http.client
|
||||
import random
|
||||
import shutil
|
||||
import subprocess
|
||||
|
@ -373,13 +374,19 @@ def check_node(i):
|
|||
return bitcoind_processes[i].returncode
|
||||
|
||||
def stop_node(node, i):
|
||||
node.stop()
|
||||
try:
|
||||
node.stop()
|
||||
except http.client.CannotSendRequest as e:
|
||||
print("WARN: Unable to stop node: " + repr(e))
|
||||
bitcoind_processes[i].wait()
|
||||
del bitcoind_processes[i]
|
||||
|
||||
def stop_nodes(nodes):
|
||||
for node in nodes:
|
||||
node.stop()
|
||||
try:
|
||||
node.stop()
|
||||
except http.client.CannotSendRequest as e:
|
||||
print("WARN: Unable to stop node: " + repr(e))
|
||||
del nodes[:] # Emptying array closes connections as a side effect
|
||||
|
||||
def set_node_times(nodes, t):
|
||||
|
|
Loading…
Reference in New Issue