test: clean up interface_http and improve idle timeout coverage #34772

pull pinheadmz wants to merge 2 commits into bitcoin:master from pinheadmz:rpctimeout-busy-idle changing 1 files +184 −151
  1. pinheadmz commented at 11:07 pm on March 7, 2026: member

    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.

  2. DrahtBot added the label Tests on Mar 7, 2026
  3. DrahtBot commented at 11:08 pm on March 7, 2026: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK Bortlesboat

    If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.

  4. test: clean up and modernize interface_http d180ee27a1
  5. test: ensure HTTP server timeout is not called by a delayed response b2bfeabf4c
  6. pinheadmz force-pushed on Mar 7, 2026
  7. DrahtBot added the label CI failed on Mar 7, 2026
  8. DrahtBot removed the label CI failed on Mar 8, 2026
  9. Bortlesboat commented at 6:59 pm on March 8, 2026: none
    Tested ACK b2bfeabf4c. Checked out the branch, ran interface_http.py locally — all passes. The BitcoinHTTPConnection helper cleans up the test nicely and the new check_server_busy_idle_timeout case is a good addition for the rpcservertimeout behavior. Found one minor typo (inline).

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-03-09 09:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me