test: clean up interface_http and improve idle timeout coverage#34772
Open
pinheadmz wants to merge 2 commits intobitcoin:masterfrom
Open
test: clean up interface_http and improve idle timeout coverage#34772pinheadmz wants to merge 2 commits intobitcoin:masterfrom
pinheadmz wants to merge 2 commits intobitcoin:masterfrom
Conversation
Contributor
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please copy-paste |
b1af6f5 to
b2bfeab
Compare
Bortlesboat
reviewed
Mar 8, 2026
Bortlesboat
left a comment
There was a problem hiding this comment.
Tested ACK b2bfeab. 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).
Bortlesboat
reviewed
Mar 8, 2026
| good_http_request = "GET /test2 HTTP/1.1\r\nHost: somehost\r\n\r\n" | ||
| conn.reset_conn() | ||
| conn.conn.sock.sendall(good_http_request.encode("utf-8")) | ||
| respose2 = conn.recv_raw() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 (comment) it is pointed out that the idle timeout set by
-rpcservertimeoutcould 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
waitforblockpast the-rpcservertimeoutvalue 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.