17
17
if shutil .which ("mpiexec" ):
18
18
_engine_launcher_classes .append ("MPI" )
19
19
20
+ _timeout = 30
21
+
20
22
21
23
@pytest .fixture
22
24
def Cluster (request , io_loop ):
@@ -112,7 +114,7 @@ async def test_start_stop_cluster(Cluster, engine_launcher_class):
112
114
assert len (cluster ._engine_sets ) == 1
113
115
114
116
with cluster .connect_client () as rc :
115
- rc .wait_for_engines (n , timeout = 10 )
117
+ rc .wait_for_engines (n , timeout = _timeout )
116
118
await cluster .stop_cluster ()
117
119
assert cluster ._controller is None
118
120
assert cluster ._engine_sets == {}
@@ -130,7 +132,7 @@ async def test_signal_engines(request, Cluster, engine_launcher_class):
130
132
# seems to be a problem if we start too soon...
131
133
await asyncio .sleep (1 )
132
134
# ensure responsive
133
- rc [:].apply_async (lambda : None ).get (timeout = 10 )
135
+ rc [:].apply_async (lambda : None ).get (timeout = _timeout )
134
136
# submit request to be interrupted
135
137
ar = rc [:].apply_async (time .sleep , 3 )
136
138
# wait for it to be running
@@ -140,7 +142,7 @@ async def test_signal_engines(request, Cluster, engine_launcher_class):
140
142
141
143
# wait for result, which should raise KeyboardInterrupt
142
144
with raises_remote (KeyboardInterrupt ) as e :
143
- ar .get (timeout = 10 )
145
+ ar .get (timeout = _timeout )
144
146
rc .close ()
145
147
146
148
await cluster .stop_engines ()
@@ -161,7 +163,7 @@ async def test_restart_engines(Cluster, engine_launcher_class):
161
163
while any (eid in rc .ids for eid in range (n )):
162
164
await asyncio .sleep (0.1 )
163
165
# wait for register
164
- rc .wait_for_engines (n , timeout = 10 )
166
+ rc .wait_for_engines (n , timeout = _timeout )
165
167
after_pids = rc [:].apply_sync (os .getpid )
166
168
assert set (after_pids ).intersection (before_pids ) == set ()
167
169
0 commit comments