Skip to content

[Test][kv_offload] Fix flaky drain() helper in test_fs_tier.py - #48545

Merged
orozery merged 1 commit into
vllm-project:mainfrom
chaojun-zhang:ci/cpu_offload
Jul 15, 2026
Merged

orozery merged 1 commit into
vllm-project:mainfrom
chaojun-zhang:ci/cpu_offload

Conversation

@chaojun-zhang

Copy link
Copy Markdown
Contributor

Summary

The drain() test helper in test_fs_tier.py used a polling loop that exited early after 20 consecutive empty rounds (200 ms). Under a loaded system, store tasks could complete after the 200 ms window, causing test_load_job_emits_no_event and test_partially_failed_store_emits_no_event to fail with assert 0 == 1.

Fix

Replace the polling loop with tier.drain_jobs() (which calls wait_idle() and blocks until all in-flight tasks truly finish) followed by a single get_finished_jobs() call. This is both simpler and race-condition-free.

Signed-off-by: Chaojun Zhang <chaojun.zhang@intel.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@mergify mergify Bot added the v1 label Jul 14, 2026
@yma11

yma11 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

The new code will cause possible hang instead of expected failure?

@orozery orozery added the ready ONLY add when PR is ready to merge/full CI is needed label Jul 15, 2026
@orozery
orozery merged commit 5811ed6 into vllm-project:main Jul 15, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants