Merge #15350: qa: Drop RPC connection if --usecli
Summary:
PR15350 Backport. Fixes --usecli slowdown from D5170 .
6440e61375 qa: Drop RPC connection if --usecli (João Barbosa)
Pull request description:
Drop the RPC connection used in `TestNode.wait_for_rpc_connection` if `--usecli` is set. If the connection is kept and not used the `Connection: close` header is never sent and so the connection only closes due to timeout (30 sec). It might be sensible to revert e98a9eede2fb48ff33a020acc888cbcd83e24bbf in a follow up, however it changes the shutdown behavior.
Depends on D5170.
Test Plan: ninja check-all ; observe --cli tests aren't particularly slow compared to their normal counterparts
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D5171