Skip to content

Commit cc66612

Browse files
abrarsheikhpeterxcli
authored andcommitted
[serve] deflake windows test (ray-project#59771)
test_controller was timing out ``` [2025-12-30T19:04:59Z] //python/ray/serve/tests:test_controller TIMEOUT in 3 out of 3 in 60.1s ``` Signed-off-by: abrar <abrar@anyscale.com> Signed-off-by: peterxcli <peterxcli@gmail.com>
1 parent acdf54a commit cc66612

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

python/ray/serve/tests/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ py_test_module_list(
7474
"test_advanced.py",
7575
"test_cluster_node_info_cache.py",
7676
"test_constructor_failure.py",
77-
"test_controller.py",
7877
"test_deployment_version.py",
7978
"test_enable_task_events.py",
8079
"test_expected_versions.py",
@@ -107,6 +106,7 @@ py_test_module_list(
107106
"test_batching.py",
108107
"test_callback.py",
109108
"test_cluster.py",
109+
"test_controller.py",
110110
"test_controller_recovery.py",
111111
"test_deploy_2.py",
112112
"test_deployment_scheduler.py",

python/ray/serve/tests/test_deploy_2.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ async def __call__(self):
123123
with ThreadPoolExecutor() as pool:
124124
# Send the first request, it should block for the result
125125
first_blocking_fut = pool.submit(functools.partial(httpx.get, url, timeout=100))
126-
time.sleep(1)
126+
wait_for_condition(lambda: ray.get(s.cur_num_waiters.remote()) == 1)
127127
assert not first_blocking_fut.done()
128128

129129
# Send more requests, these should be queued in handle.
@@ -134,8 +134,7 @@ async def __call__(self):
134134
pool.submit(functools.partial(httpx.get, url, timeout=0.5))
135135
for _ in range(3)
136136
]
137-
time.sleep(1)
138-
assert all(f.done() for f in rest_blocking_futs)
137+
wait_for_condition(lambda: all(f.done() for f in rest_blocking_futs))
139138

140139
# Now unblock the first request.
141140
ray.get(s.send.remote())

0 commit comments

Comments
 (0)