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:
Matthew Zipkin
2025-04-02 15:46:46 -04:00
parent 5b8046a6e8
commit f16c8c67bf
3 changed files with 139 additions and 0 deletions

View File

@@ -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: