Skip to content

Commit

Permalink
Fix (googleapis#1206) connections deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
xionams committed Dec 3, 2024
1 parent 50504ae commit 577ee9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ def test_subscriber_not_leaking_open_sockets(
publisher.create_topic(name=topic_path)

current_process = psutil.Process()
conn_count_start = len(current_process.connections())
conn_count_start = len(current_process.net_connections())

# Publish a few messages, then synchronously pull them and check that
# no sockets are leaked.
Expand All @@ -487,7 +487,7 @@ def test_subscriber_not_leaking_open_sockets(
response = subscriber.pull(subscription=subscription_path, max_messages=3)
assert len(response.received_messages) == 3

conn_count_end = len(current_process.connections())
conn_count_end = len(current_process.net_connections())

# To avoid flakiness, use <= in the assertion, since on rare occasions additional
# sockets are closed, causing the == assertion to fail.
Expand Down

0 comments on commit 577ee9f

Please sign in to comment.