Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
6dad4c57
Unverified
Commit
6dad4c57
authored
Mar 28, 2026
by
yzong-rh
Committed by
GitHub
Mar 28, 2026
Browse files
[Test] Fix flaky race condition in test_abort_final_step (#38414)
Signed-off-by:
Yifan
<
yzong@redhat.com
>
parent
171775f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
11 deletions
+19
-11
tests/v1/engine/test_abort_final_step.py
tests/v1/engine/test_abort_final_step.py
+19
-11
No files found.
tests/v1/engine/test_abort_final_step.py
View file @
6dad4c57
...
@@ -259,8 +259,25 @@ async def test_abort_during_final_step(async_scheduling: bool):
...
@@ -259,8 +259,25 @@ async def test_abort_during_final_step(async_scheduling: bool):
# Wait for generation to complete
# Wait for generation to complete
await
gen_task
await
gen_task
# Give the scheduler a moment to finish cleanup
# Poll for the KV connector to record the finish status
await
asyncio
.
sleep
(
0.1
)
timeout
=
5.0
start
=
time
.
time
()
captured_statuses
=
[]
while
time
.
time
()
-
start
<
timeout
:
with
open
(
status_file
)
as
f4
:
status_lines
=
f4
.
read
().
strip
().
split
(
"
\n
"
)
captured_statuses
=
[
line
for
line
in
status_lines
if
line
and
line
.
startswith
(
"FINISHED_"
)
]
if
captured_statuses
:
break
await
asyncio
.
sleep
(
0.05
)
else
:
raise
TimeoutError
(
"Timeout waiting for KV connector to record finish status."
)
# Verify we got output
# Verify we got output
assert
len
(
outputs
)
>
0
,
"Should have received at least one output"
assert
len
(
outputs
)
>
0
,
"Should have received at least one output"
...
@@ -275,15 +292,6 @@ async def test_abort_during_final_step(async_scheduling: bool):
...
@@ -275,15 +292,6 @@ async def test_abort_during_final_step(async_scheduling: bool):
f
"'
{
final_output
.
outputs
[
0
].
finish_reason
}
'. "
f
"'
{
final_output
.
outputs
[
0
].
finish_reason
}
'. "
)
)
with
open
(
status_file
)
as
f4
:
status_lines
=
f4
.
read
().
strip
().
split
(
"
\n
"
)
# Filter for actual finish statuses (not INIT or empty lines)
captured_statuses
=
[
line
for
line
in
status_lines
if
line
and
line
.
startswith
(
"FINISHED_"
)
]
assert
len
(
captured_statuses
)
>=
1
,
(
assert
len
(
captured_statuses
)
>=
1
,
(
f
"Expected at least 1 captured finish status, got "
f
"Expected at least 1 captured finish status, got "
f
"
{
len
(
captured_statuses
)
}
. File content:
{
status_lines
}
"
f
"
{
len
(
captured_statuses
)
}
. File content:
{
status_lines
}
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment