Skip to content

Commit 41516e3

Browse files
committed
test: add delay to async client teardown to prevent API rate limits
1 parent f586d17 commit 41516e3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/integration/conftest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,13 @@ def client(api_key):
4444
@pytest.fixture
4545
async def async_client(api_key):
4646
"""Async Fish Audio client."""
47+
import asyncio
48+
4749
client = AsyncFishAudio(api_key=api_key)
4850
yield client
4951
await client.close()
52+
# Brief delay to avoid API rate limits on WebSocket connections
53+
await asyncio.sleep(0.3)
5054

5155

5256
@pytest.fixture

0 commit comments

Comments
 (0)