diff options
author | João Barbosa <joao.paulo.barbosa@gmail.com> | 2019-02-06 00:03:09 +0000 |
---|---|---|
committer | João Barbosa <joao.paulo.barbosa@gmail.com> | 2019-02-06 00:04:28 +0000 |
commit | 6440e6137553a51480aad68f6048be4ffce7bfff (patch) | |
tree | d6690533364273508a10cba5860c484d3b6cbb90 /test | |
parent | 5029e94f855c73bad2e0ea6dc0378f33787ae131 (diff) |
qa: Drop RPC connection if --usecli
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/test_framework/test_node.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py index d6e31457d1..999ea68254 100755 --- a/test/functional/test_framework/test_node.py +++ b/test/functional/test_framework/test_node.py @@ -209,12 +209,15 @@ class TestNode(): raise FailedToStartError(self._node_msg( 'bitcoind exited with status {} during initialization'.format(self.process.returncode))) try: - self.rpc = get_rpc_proxy(rpc_url(self.datadir, self.index, self.rpchost), self.index, timeout=self.rpc_timeout, coveragedir=self.coverage_dir) - self.rpc.getblockcount() + rpc = get_rpc_proxy(rpc_url(self.datadir, self.index, self.rpchost), self.index, timeout=self.rpc_timeout, coveragedir=self.coverage_dir) + rpc.getblockcount() # If the call to getblockcount() succeeds then the RPC connection is up + self.log.debug("RPC successfully started") + if self.use_cli: + return + self.rpc = rpc self.rpc_connected = True self.url = self.rpc.url - self.log.debug("RPC successfully started") return except IOError as e: if e.errno != errno.ECONNREFUSED: # Port not yet open? |