Enable test_actor_pool in CI (#7405)

This commit is contained in:
Edward Oakes
2020-03-02 20:24:37 -06:00
committed by GitHub
parent 2b6f00724a
commit 9e9f1962c7
+9 -4
View File
@@ -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__]))