mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
Enable test_async_goal_manager (#14419)
This commit is contained in:
parent
2a28585bb3
commit
ff00a89927
2 changed files with 10 additions and 1 deletions
|
@ -25,6 +25,14 @@ py_test(
|
|||
deps = [":serve_lib"],
|
||||
)
|
||||
|
||||
py_test(
|
||||
name = "test_async_goal_manager",
|
||||
size = "small",
|
||||
srcs = serve_tests_srcs,
|
||||
tags = ["exclusive"],
|
||||
deps = [":serve_lib"],
|
||||
)
|
||||
|
||||
py_test(
|
||||
name = "test_backend_worker",
|
||||
size = "small",
|
||||
|
|
|
@ -12,7 +12,8 @@ async def test_wait_for_goals():
|
|||
await manager.wait_for_goal(None)
|
||||
|
||||
goal_id = manager.create_goal()
|
||||
waiting = asyncio.create_task(manager.wait_for_goal(goal_id))
|
||||
loop = asyncio.get_event_loop()
|
||||
waiting = loop.create_task(manager.wait_for_goal(goal_id))
|
||||
|
||||
assert not waiting.done(), "Unfinished task should not be done"
|
||||
manager.complete_goal(goal_id)
|
||||
|
|
Loading…
Add table
Reference in a new issue