Skip to content

Commit e4a7108

Browse files
committed
remove unnecessary sleeps
1 parent 97d3902 commit e4a7108

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

tests/shared/test_progress_notifications.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,13 @@ async def handle_call_tool(name: str, arguments: dict | None) -> list:
110110
total=1.0,
111111
message="Server progress 25%",
112112
)
113-
await anyio.sleep(0.2)
114113

115114
await serv_sesh.send_progress_notification(
116115
progress_token=progressToken,
117116
progress=0.5,
118117
total=1.0,
119118
message="Server progress 50%",
120119
)
121-
await anyio.sleep(0.2)
122120

123121
await serv_sesh.send_progress_notification(
124122
progress_token=progressToken,
@@ -201,7 +199,7 @@ async def handle_client_message(
201199
)
202200

203201
# Wait and exit
204-
await anyio.sleep(1.0)
202+
await anyio.sleep(0.5)
205203
tg.cancel_scope.cancel()
206204

207205
# Verify client received progress updates from server
@@ -315,16 +313,9 @@ async def handle_client_message(
315313
# Utilize progress context manager
316314
with progress(typed_context, total=100) as p:
317315
await p.progress(10, message="Loading configuration...")
318-
await anyio.sleep(0.1)
319-
320316
await p.progress(30, message="Connecting to database...")
321-
await anyio.sleep(0.1)
322-
323317
await p.progress(40, message="Fetching data...")
324-
await anyio.sleep(0.1)
325-
326318
await p.progress(20, message="Processing results...")
327-
await anyio.sleep(0.1)
328319

329320
# Wait for all messages to be processed
330321
await anyio.sleep(0.5)

0 commit comments

Comments
 (0)