Skip to content

Commit 23dc2f2

Browse files
committed
refactor: remove redundant _instant_backoff test helper
exp_backoff is already a pure generator with no sleep, so patching it with an identical helper added no value. asyncio.sleep is mocked separately.
1 parent de6d889 commit 23dc2f2

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

tests/test_connection_manager.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@
66
from getstream.video.rtc.pb.stream.video.sfu.models import models_pb2
77

88

9-
async def _instant_backoff(max_retries, base=1.0, factor=2.0):
10-
"""exp_backoff replacement that yields without delay."""
11-
for attempt in range(max_retries):
12-
yield base * (factor**attempt)
13-
14-
159
@pytest.fixture
1610
def connection_manager(request):
1711
"""Create a ConnectionManager with mocked heavy dependencies.
@@ -27,7 +21,6 @@ def connection_manager(request):
2721
patch("getstream.video.rtc.connection_manager.SubscriptionManager"),
2822
patch("getstream.video.rtc.connection_manager.ParticipantsState"),
2923
patch("getstream.video.rtc.connection_manager.Tracer"),
30-
patch("getstream.video.rtc.connection_manager.exp_backoff", _instant_backoff),
3124
patch(
3225
"getstream.video.rtc.connection_manager.asyncio.sleep",
3326
new_callable=AsyncMock,

0 commit comments

Comments
 (0)