Skip to content

Commit 68e4397

Browse files
committed
relax timeout in cluster tests
CI VMs are slow
1 parent 44c32f3 commit 68e4397

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ipyparallel/tests/test_cluster.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
if shutil.which("mpiexec"):
1818
_engine_launcher_classes.append("MPI")
1919

20+
_timeout = 30
21+
2022

2123
@pytest.fixture
2224
def Cluster(request, io_loop):
@@ -112,7 +114,7 @@ async def test_start_stop_cluster(Cluster, engine_launcher_class):
112114
assert len(cluster._engine_sets) == 1
113115

114116
with cluster.connect_client() as rc:
115-
rc.wait_for_engines(n, timeout=10)
117+
rc.wait_for_engines(n, timeout=_timeout)
116118
await cluster.stop_cluster()
117119
assert cluster._controller is None
118120
assert cluster._engine_sets == {}
@@ -130,7 +132,7 @@ async def test_signal_engines(request, Cluster, engine_launcher_class):
130132
# seems to be a problem if we start too soon...
131133
await asyncio.sleep(1)
132134
# ensure responsive
133-
rc[:].apply_async(lambda: None).get(timeout=10)
135+
rc[:].apply_async(lambda: None).get(timeout=_timeout)
134136
# submit request to be interrupted
135137
ar = rc[:].apply_async(time.sleep, 3)
136138
# wait for it to be running
@@ -140,7 +142,7 @@ async def test_signal_engines(request, Cluster, engine_launcher_class):
140142

141143
# wait for result, which should raise KeyboardInterrupt
142144
with raises_remote(KeyboardInterrupt) as e:
143-
ar.get(timeout=10)
145+
ar.get(timeout=_timeout)
144146
rc.close()
145147

146148
await cluster.stop_engines()
@@ -161,7 +163,7 @@ async def test_restart_engines(Cluster, engine_launcher_class):
161163
while any(eid in rc.ids for eid in range(n)):
162164
await asyncio.sleep(0.1)
163165
# wait for register
164-
rc.wait_for_engines(n, timeout=10)
166+
rc.wait_for_engines(n, timeout=_timeout)
165167
after_pids = rc[:].apply_sync(os.getpid)
166168
assert set(after_pids).intersection(before_pids) == set()
167169

0 commit comments

Comments
 (0)