Skip to content

Commit 929fd31

Browse files
committed
Fix flaky test_idle_heartbeat and CI workflow YAML syntax
The test_idle_heartbeat test could fail with a KeyError when shard-aware reconnection replaced connections during the sleep interval. Skip connections not present in the original snapshot. Also fix a trailing whitespace/dash in integration-tests.yml that caused a YAML syntax issue in the paths-ignore list.
1 parent b4e4b59 commit 929fd31

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ on:
2929
- .github/dependabot.yml
3030
- .github/pull_request_template.md
3131
- "*.md"
32-
- .github/workflows/docs-* -
32+
- .github/workflows/docs-*
3333
workflow_dispatch:
3434

3535
jobs:

tests/integration/standard/test_cluster.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,8 +746,11 @@ def test_idle_heartbeat(self):
746746

747747
connections = [c for holders in cluster.get_connection_holders() for c in holders.get_connections()]
748748

749-
# make sure requests were sent on all connections
749+
# make sure requests were sent on all connections that existed before the sleep
750+
# (shard-aware reconnection may replace connections during the sleep interval)
750751
for c in connections:
752+
if id(c) not in connection_request_ids:
753+
continue
751754
expected_ids = connection_request_ids[id(c)]
752755
expected_ids.rotate(-1)
753756
with c.lock:

0 commit comments

Comments
 (0)