Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion tests/integration/standard/test_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -769,11 +769,21 @@ def test_idle_heartbeat(self):
connections = [c for holders in cluster.get_connection_holders() for c in holders.get_connections()]

# make sure requests were sent on all connections
# Note: connections can be replaced in shard-aware environments, so we skip
# connections that weren't present in the initial snapshot
validated_connections = 0
for c in connections:
expected_ids = connection_request_ids[id(c)]
conn_id = id(c)
if conn_id not in connection_request_ids:
# Connection was replaced during the test, skip validation
continue
expected_ids = connection_request_ids[conn_id]
expected_ids.rotate(-1)
with c.lock:
assertListEqual(list(c.request_ids), list(expected_ids))
validated_connections += 1

assert validated_connections > 0

# assert idle status
assert all(c.is_idle for c in connections)
Expand Down
Loading