mirror of
https://github.com/vale981/ray
synced 2025-03-05 18:11:42 -05:00
Fix no cpus test (#5009)
This commit is contained in:
parent
3b23d94cb8
commit
a7f84b536f
2 changed files with 9 additions and 1 deletions
|
@ -56,6 +56,14 @@ def _ray_start(**kwargs):
|
|||
ray.shutdown()
|
||||
|
||||
|
||||
# The following fixture will start ray with 0 cpu.
|
||||
@pytest.fixture
|
||||
def ray_start_no_cpu(request):
|
||||
param = getattr(request, "param", {})
|
||||
with _ray_start(num_cpus=0, **param) as res:
|
||||
yield res
|
||||
|
||||
|
||||
# The following fixture will start ray with 1 cpu.
|
||||
@pytest.fixture
|
||||
def ray_start_regular(request):
|
||||
|
|
|
@ -842,7 +842,7 @@ def test_remote_functions_not_scheduled_on_actors(ray_start_regular):
|
|||
assert actor_id not in resulting_ids
|
||||
|
||||
|
||||
def test_actors_on_nodes_with_no_cpus(ray_start_regular):
|
||||
def test_actors_on_nodes_with_no_cpus(ray_start_no_cpu):
|
||||
@ray.remote
|
||||
class Foo(object):
|
||||
def method(self):
|
||||
|
|
Loading…
Add table
Reference in a new issue