mirror of
https://github.com/wassname/ray.git
synced 2026-08-18 12:20:14 +08:00
Refactor pytest fixtures for ray core (#4390)
This commit is contained in:
@@ -473,21 +473,13 @@ def test_nondeterministic_task(ray_start_reconstruction):
|
||||
assert cluster.remaining_processes_alive()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def ray_start_driver_put_errors():
|
||||
plasma_store_memory = 10**9
|
||||
# Start the Ray processes.
|
||||
ray.init(num_cpus=1, object_store_memory=plasma_store_memory)
|
||||
yield plasma_store_memory
|
||||
# The code after the yield will run as teardown code.
|
||||
ray.shutdown()
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
os.environ.get("RAY_USE_NEW_GCS") == "on",
|
||||
reason="Failing with new GCS API on Linux.")
|
||||
def test_driver_put_errors(ray_start_driver_put_errors):
|
||||
plasma_store_memory = ray_start_driver_put_errors
|
||||
@pytest.mark.parametrize(
|
||||
"ray_start_object_store_memory", [10**9], indirect=True)
|
||||
def test_driver_put_errors(ray_start_object_store_memory):
|
||||
plasma_store_memory = ray_start_object_store_memory
|
||||
# Define the size of one task's return argument so that the combined
|
||||
# sum of all objects' sizes is at least twice the plasma stores'
|
||||
# combined allotted memory.
|
||||
|
||||
Reference in New Issue
Block a user