AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 15 Bitcoin

Merge bitcoin/bitcoin#36848: test: drop flaky "server too slow" check from interface_http.py

Public commit record

What the developer wrote

Authored by merge-script

100/100 · Strong
Merge bitcoin/bitcoin#36848: test: drop flaky "server too slow" check from interface_http.py

75a23e7d36afbbcfedef11bca94967b88bf40de0 test: drop flaky "server too slow" check from interface_http.py (Matthew Zipkin)

Pull request description:

Closes https://github.com/bitcoin/bitcoin/issues/36755

To cover `-rpcservertimeout` behavior our test expected the Bitcoin Core HTTP server to disconnect the test framework client after the configured duration but also *before* a somewhat arbitrary upper bound. This was helpful during development of #35182 but has led to false negatives in CI on platforms that are just plain slow.

Solve the flakiness by simply deleting the test case. Note that a regression is still caught by both the functional test and unit test suite. #36159 added a mock clock in the unit test to assert the disconnect timing. A server with no timeout would also fail the functional test which will time out during `sock.recv()` waiting for the EOF.

Both regression test failures can be observed on top of this branch by disabling rpcservertimeout:

```diff
diff --git a/src/httpserver.cpp b/src/httpserver.cpp
index 069eace507..7a090c4ca8 100644
--- a/src/httpserver.cpp
+++ b/src/httpserver.cpp
@@ -1205,7 +1205,7 @@ bool HTTPRemoteClient::ShouldDisconnect(MockableSteadyClock::time_point now, std
"HTTP client idle timeout %s (id=%llu)",
m_origin,
m_id);
- return true;
+ return false;
// Disconnect this client because the server is shutting down and we need to
// disconnect all clients... Unless the client is still being handled by a
// worker thread, in which case we'd rather continue the I/O loop (but might

```

ACKs for top commit:
maflcko:
lgtm ACK 75a23e7d36afbbcfedef11bca94967b88bf40de0
Pranav-error:
tACK 75a23e7d36afbbcfedef11bca94967b88bf40de0. Ran `interface_http.py` with the PR and it passes. With the mutant from the description, it fails with a `TimeoutError` after about 71 seconds in `recv_raw`.

Tree-SHA512: 61ad6efcc0a8dc6141f8bdd28b1a8f62d9f89b162796c4bffe605867f0b67617b764a0ff071318bbc81631fc407ea1c8e7608d533627758bf7c752df10c9a5bb
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit only changes a test file to make a timing check less strict. It removes an upper-bound timing assertion that was causing false test failures on slow CI machines. There is no change to Bitcoin Core's actual network or wallet code, so it does not introduce or fix a security issue in the software users run.

Recommended action

No security action needed. This is a test-only reliability improvement.

Security signals we found

No strong security signals were identified.

Risk score

Why this scored 15/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 10/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.