Skip to content

Commit 454e7e5

Browse files
authored
[https://nvbugs/5718004][fix] Add warmup for cancellation test (#9860)
Signed-off-by: Junyi Xu <[email protected]>
1 parent 81222c3 commit 454e7e5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/unittest/llmapi/apps/_test_openai_misc.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ async def test_request_cancellation(server: RemoteOpenAIServer,
8989
# clunky test: send an ungodly amount of load in with short timeouts
9090
# then ensure that it still responds quickly afterwards
9191
chat_input = [{"role": "user", "content": "Write a long story"}]
92+
93+
# Warmup
94+
client = server.get_async_client()
95+
response = await client.chat.completions.create(messages=chat_input,
96+
model=model_name,
97+
max_tokens=10000)
98+
9299
client = server.get_async_client(timeout=0.5, max_retries=3)
93100
tasks = []
94101
# Request about 2 million tokens

0 commit comments

Comments
 (0)