mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
Fix flaky test_locality_aware_leasing_borrowed_objects (#24452)
The test is flaky because we schedule g task without waiting for f task to complete (because f_obj is embedded inside a list) so we may not have the locality information for f_obj from owner during g task scheduling. Related issue number Closes #23964
This commit is contained in:
parent
e00c611807
commit
6bd65ceb1c
1 changed files with 4 additions and 0 deletions
|
@ -413,6 +413,10 @@ def test_locality_aware_leasing_borrowed_objects(ray_start_cluster):
|
|||
|
||||
# f will run on worker, f_obj will be pinned on worker.
|
||||
f_obj = f.options(resources={"pin_worker": 1}).remote()
|
||||
# Make sure owner has the location information for f_obj,
|
||||
# before we launch g so g worker can get the locality information
|
||||
# from the owner.
|
||||
ray.wait([f_obj], fetch_local=False)
|
||||
# g will run on head, f_obj will be borrowed by head, and we confirm that
|
||||
# h(f_obj) is scheduled onto worker, the node that has f_obj.
|
||||
assert (
|
||||
|
|
Loading…
Add table
Reference in a new issue