This is a follow-up to #32408 and a new prerequisite for #32061 in response to a review comment about the replacement HTTP server behavior.
In #32061 (review) it is pointed out that the idle timeout set by -rpcservertimeout could disconnect a client unfairly if it was the server that was taking too long to process a response. That misbehavior was confirmed and #32061 was updated to match current libevent behavior.
This PR asserts the current libevent behavior by adding another test using RPC waitforblock past the -rpcservertimeout value and then verifying that the HTTP connection is still open. The test currently passes on #32061 and I’ll rebase when ready.
Also since I am extending this test module again I refactored the monolithic test to resemble the current functional test style in the repository, deduplicating HTTP connection code with a helper class and separating individual test cases into functions.
I’m trying to figure out how to get a clean transcript of both old and new tests from Wireshark, and I’ll post that for extra confidence.