mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-17 11:00:44 +01:00
tests: Expand HTTP coverage to assert libevent behavior
Covers: - http pipelining - rpcservertimeout Testing this requires adding an option to TestNode to force the test framework to establish a new HTTP connection for every RPC. Otherwise, attempting to reuse a persistent connection would cause framework RPCs during startup and shutdown to fail. - "chunked" Transfer-Encoding
This commit is contained in:
@@ -156,6 +156,7 @@ class TestNode():
|
||||
self.process = None
|
||||
self.rpc_connected = False
|
||||
self.rpc = None
|
||||
self.reuse_http_connections = True # Must be set before calling get_rpc_proxy() i.e. before restarting node
|
||||
self.url = None
|
||||
self.log = logging.getLogger('TestFramework.node%d' % i)
|
||||
# Cache perf subprocesses here by their data output filename.
|
||||
@@ -280,6 +281,7 @@ class TestNode():
|
||||
timeout=self.rpc_timeout // 2, # Shorter timeout to allow for one retry in case of ETIMEDOUT
|
||||
coveragedir=self.coverage_dir,
|
||||
)
|
||||
rpc.auth_service_proxy_instance.reuse_http_connections = self.reuse_http_connections
|
||||
rpc.getblockcount()
|
||||
# If the call to getblockcount() succeeds then the RPC connection is up
|
||||
if self.version_is_at_least(190000) and wait_for_import:
|
||||
|
||||
Reference in New Issue
Block a user