@@ -34,7 +34,7 @@ async def _():
3434 1 : {"cls" : Worker , "options" : {"nthreads" : 2 }},
3535 "my-worker" : {"cls" : MyWorker , "options" : {"nthreads" : 3 }},
3636}
37- scheduler = {"cls" : Scheduler , "options" : {"port" : 0 }}
37+ scheduler = {"cls" : Scheduler , "options" : {"port" : 0 , "dashboard_address" : ":0" }}
3838
3939
4040@gen_test ()
@@ -89,9 +89,7 @@ def test_spec_sync(loop):
8989
9090
9191def test_loop_started ():
92- with SpecCluster (
93- worker_spec , scheduler = {"cls" : Scheduler , "options" : {"port" : 0 }}
94- ) as cluster :
92+ with SpecCluster (worker_spec , scheduler = scheduler ):
9593 pass
9694
9795
@@ -146,7 +144,7 @@ async def test_adaptive_killed_worker():
146144 async with SpecCluster (
147145 asynchronous = True ,
148146 worker = {"cls" : Nanny , "options" : {"nthreads" : 1 }},
149- scheduler = { "cls" : Scheduler , "options" : { "port" : 0 }} ,
147+ scheduler = scheduler ,
150148 ) as cluster :
151149 async with Client (cluster , asynchronous = True ) as client :
152150 # Scale up a cluster with 1 worker.
@@ -221,7 +219,7 @@ async def test_broken_worker():
221219 async with SpecCluster (
222220 asynchronous = True ,
223221 workers = {"good" : {"cls" : Worker }, "bad" : {"cls" : BrokenWorker }},
224- scheduler = { "cls" : Scheduler , "options" : { "port" : 0 }} ,
222+ scheduler = scheduler ,
225223 ):
226224 pass
227225
@@ -254,12 +252,8 @@ def new_worker_spec(self):
254252
255253@gen_test ()
256254async def test_nanny_port ():
257- scheduler = {"cls" : Scheduler }
258255 workers = {0 : {"cls" : Nanny , "options" : {"port" : 9200 }}}
259-
260- async with SpecCluster (
261- scheduler = scheduler , workers = workers , asynchronous = True
262- ) as cluster :
256+ async with SpecCluster (scheduler = scheduler , workers = workers , asynchronous = True ):
263257 pass
264258
265259
0 commit comments