You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix test_idle_heartbeat: wait for shard connections and fix idle assertion
Two issues caused this test to be flaky:
1. wait_for_all_pools only waits for the first connection per host.
Shard-aware connections to remaining shards are opened asynchronously.
When these complete during the test's sleep interval, they replace
existing connections causing KeyError on the request_ids snapshot.
Fix: add a helper that polls until all shard connections are
established, called after connect().
2. execute_concurrent sent only len(hosts) queries, but with shard-aware
routing each query hits one specific shard, leaving other shards'
connections idle. The assertion that ALL connections are non-idle
then fails.
Fix: send more queries (2x num_connections) and relax assertion to
check that at least some non-control connections became non-idle.
0 commit comments