mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
Split tests for timeout (#14516)
This commit is contained in:
parent
3fab5e2ada
commit
dec3aa3453
3 changed files with 42 additions and 33 deletions
|
@ -18,6 +18,8 @@ py_test_module_list(
|
|||
"test_actor_resources.py",
|
||||
"test_advanced.py",
|
||||
"test_advanced_2.py",
|
||||
"test_advanced_3.py",
|
||||
"test_advanced_4.py",
|
||||
"test_array.py",
|
||||
"test_autoscaling_policy.py",
|
||||
"test_basic.py",
|
||||
|
@ -125,7 +127,6 @@ py_test_module_list(
|
|||
files = [
|
||||
"test_failure.py",
|
||||
"test_stress_failure.py",
|
||||
"test_advanced_3.py",
|
||||
],
|
||||
size = "large",
|
||||
extra_srcs = SRCS,
|
||||
|
|
|
@ -18,7 +18,6 @@ import ray.cluster_utils
|
|||
import ray.test_utils
|
||||
from ray import resource_spec
|
||||
import setproctitle
|
||||
import subprocess
|
||||
|
||||
from ray.test_utils import (check_call_ray, wait_for_condition,
|
||||
wait_for_num_actors)
|
||||
|
@ -194,26 +193,6 @@ def test_object_ref_properties():
|
|||
assert id_from_dumps == object_ref
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def shutdown_only_with_initialization_check():
|
||||
yield None
|
||||
# The code after the yield will run as teardown code.
|
||||
ray.shutdown()
|
||||
assert not ray.is_initialized()
|
||||
|
||||
|
||||
def test_initialized(shutdown_only_with_initialization_check):
|
||||
assert not ray.is_initialized()
|
||||
ray.init(num_cpus=0)
|
||||
assert ray.is_initialized()
|
||||
|
||||
|
||||
def test_initialized_local_mode(shutdown_only_with_initialization_check):
|
||||
assert not ray.is_initialized()
|
||||
ray.init(num_cpus=0, local_mode=True)
|
||||
assert ray.is_initialized()
|
||||
|
||||
|
||||
def test_wait_reconstruction(shutdown_only):
|
||||
ray.init(num_cpus=1, object_store_memory=int(10**8))
|
||||
|
||||
|
@ -414,17 +393,6 @@ def test_export_after_shutdown(ray_start_regular):
|
|||
ray.get(export_definitions_from_worker.remote(f, Actor))
|
||||
|
||||
|
||||
def test_ray_start_and_stop():
|
||||
for i in range(10):
|
||||
subprocess.check_call(["ray", "start", "--head"])
|
||||
subprocess.check_call(["ray", "stop"])
|
||||
|
||||
|
||||
def test_ray_memory(shutdown_only):
|
||||
ray.init(num_cpus=1)
|
||||
subprocess.check_call(["ray", "memory"])
|
||||
|
||||
|
||||
def test_invalid_unicode_in_worker_log(shutdown_only):
|
||||
info = ray.init(num_cpus=1)
|
||||
|
||||
|
|
40
python/ray/tests/test_advanced_4.py
Normal file
40
python/ray/tests/test_advanced_4.py
Normal file
|
@ -0,0 +1,40 @@
|
|||
import pytest
|
||||
import ray
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def shutdown_only_with_initialization_check():
|
||||
yield None
|
||||
# The code after the yield will run as teardown code.
|
||||
ray.shutdown()
|
||||
assert not ray.is_initialized()
|
||||
|
||||
|
||||
def test_initialized(shutdown_only_with_initialization_check):
|
||||
assert not ray.is_initialized()
|
||||
ray.init(num_cpus=0)
|
||||
assert ray.is_initialized()
|
||||
|
||||
|
||||
def test_initialized_local_mode(shutdown_only_with_initialization_check):
|
||||
assert not ray.is_initialized()
|
||||
ray.init(num_cpus=0, local_mode=True)
|
||||
assert ray.is_initialized()
|
||||
|
||||
|
||||
def test_ray_start_and_stop():
|
||||
for i in range(10):
|
||||
subprocess.check_call(["ray", "start", "--head"])
|
||||
subprocess.check_call(["ray", "stop"])
|
||||
|
||||
|
||||
def test_ray_memory(shutdown_only):
|
||||
ray.init(num_cpus=1)
|
||||
subprocess.check_call(["ray", "memory"])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import pytest
|
||||
sys.exit(pytest.main(["-v", __file__]))
|
Loading…
Add table
Reference in a new issue