Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions python/ray/serve/tests/test_target_capacity.py
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,7 @@ def test_initial_replicas_new_configs(
deployment_name: int(initial_replicas * config_target_capacity / 100)
},
app_name="app1",
timeout=30,
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

To improve readability and maintainability, it's better to define this timeout value as a named constant at the top of the file or test class, for example INITIAL_REPLICA_TEST_TIMEOUT_S = 30. This makes it easier to understand the purpose of the timeout and to adjust it in the future if needed, especially since other timeouts are used in this file.

Suggested change
timeout=30,
timeout=30, # Consider defining this as a constant, e.g., INITIAL_REPLICA_TEST_TIMEOUT_S

Copy link

Choose a reason for hiding this comment

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

Bug: Incomplete timeout propagation in test retries

The timeout increase to 30 seconds is only applied to the first wait_for_condition call in test_initial_replicas_new_configs, but two similar calls later in the same test (around lines 1103 and 1111) still use the default 10-second timeout. This incomplete fix means the test can still fail on Windows due to timeouts in those later assertions, defeating the purpose of this PR.

Fix in Cursor Fix in Web

)

# When deploying a new config, initial_replicas * target_capacity
Expand Down