mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 21:46:57 +08:00
Enable test_actor_pool in CI (#7405)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import sys
|
||||
import time
|
||||
import pytest
|
||||
|
||||
@@ -106,7 +107,7 @@ def test_get_next_timeout(init):
|
||||
pass
|
||||
|
||||
def f(self, x):
|
||||
while (True):
|
||||
while True:
|
||||
x = x + 1
|
||||
time.sleep(1)
|
||||
return None
|
||||
@@ -118,7 +119,7 @@ def test_get_next_timeout(init):
|
||||
pool = ActorPool(actors)
|
||||
pool.submit(lambda a, v: a.f.remote(v), 0)
|
||||
with pytest.raises(TimeoutError):
|
||||
pool.get_next_unordered(5)
|
||||
pool.get_next_unordered(timeout=0.1)
|
||||
|
||||
|
||||
def test_get_next_unordered_timeout(init):
|
||||
@@ -128,7 +129,7 @@ def test_get_next_unordered_timeout(init):
|
||||
pass
|
||||
|
||||
def f(self, x):
|
||||
while (True):
|
||||
while True:
|
||||
x + 1
|
||||
time.sleep(1)
|
||||
return
|
||||
@@ -141,4 +142,8 @@ def test_get_next_unordered_timeout(init):
|
||||
|
||||
pool.submit(lambda a, v: a.f.remote(v), 0)
|
||||
with pytest.raises(TimeoutError):
|
||||
pool.get_next_unordered(5)
|
||||
pool.get_next_unordered(timeout=0.1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(pytest.main(["-v", __file__]))
|
||||
|
||||
Reference in New Issue
Block a user