mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
Unskipped tests in test_actor.py
(#21501)
This commit is contained in:
parent
7517aefe05
commit
f8bcb8aeb6
1 changed files with 6 additions and 4 deletions
|
@ -735,7 +735,6 @@ def test_define_actor(ray_start_regular_shared):
|
||||||
t.f(1)
|
t.f(1)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skipif(sys.platform == "win32", reason="Failing on Windows.")
|
|
||||||
def test_actor_deletion(ray_start_regular_shared):
|
def test_actor_deletion(ray_start_regular_shared):
|
||||||
# Make sure that when an actor handles goes out of scope, the actor
|
# Make sure that when an actor handles goes out of scope, the actor
|
||||||
# destructor is called.
|
# destructor is called.
|
||||||
|
@ -1007,7 +1006,6 @@ def test_actor_creation_latency(ray_start_regular_shared):
|
||||||
actor_create_time - start, end - start))
|
actor_create_time - start, end - start))
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skipif(sys.platform == "win32", reason="Failing on Windows.")
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"exit_condition",
|
"exit_condition",
|
||||||
[
|
[
|
||||||
|
@ -1036,7 +1034,9 @@ def test_atexit_handler(ray_start_regular_shared, exit_condition):
|
||||||
ray.actor.exit_actor()
|
ray.actor.exit_actor()
|
||||||
|
|
||||||
data = "hello"
|
data = "hello"
|
||||||
tmpfile = tempfile.NamedTemporaryFile()
|
tmpfile = tempfile.NamedTemporaryFile("w+", suffix=".tmp", delete=False)
|
||||||
|
tmpfile.close()
|
||||||
|
|
||||||
a = A.remote(tmpfile.name, data)
|
a = A.remote(tmpfile.name, data)
|
||||||
ray.get(a.ready.remote())
|
ray.get(a.ready.remote())
|
||||||
|
|
||||||
|
@ -1052,7 +1052,7 @@ def test_atexit_handler(ray_start_regular_shared, exit_condition):
|
||||||
assert False, "Unrecognized condition"
|
assert False, "Unrecognized condition"
|
||||||
|
|
||||||
def check_file_written():
|
def check_file_written():
|
||||||
with open(tmpfile.name) as f:
|
with open(tmpfile.name, "r") as f:
|
||||||
if f.read() == data:
|
if f.read() == data:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
@ -1063,6 +1063,8 @@ def test_atexit_handler(ray_start_regular_shared, exit_condition):
|
||||||
else:
|
else:
|
||||||
wait_for_condition(check_file_written)
|
wait_for_condition(check_file_written)
|
||||||
|
|
||||||
|
os.unlink(tmpfile.name)
|
||||||
|
|
||||||
|
|
||||||
def test_return_actor_handle_from_actor(ray_start_regular_shared):
|
def test_return_actor_handle_from_actor(ray_start_regular_shared):
|
||||||
@ray.remote
|
@ray.remote
|
||||||
|
|
Loading…
Add table
Reference in a new issue