File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -5172,16 +5172,19 @@ def f(x):
51725172
51735173@gen_cluster (client = True )
51745174async def test_sub_submit_priority (c , s , a , b ):
5175- def f ():
5175+ def func ():
51765176 client = get_client ()
5177- client .submit (slowinc , 1 , delay = 0.2 , key = "slowinc" )
5177+ f = client .submit (slowinc , 1 , delay = 0.5 , key = "slowinc" )
5178+ client .gather (f )
51785179
5179- future = c .submit (f , key = "f" )
5180- await asyncio .sleep (0.1 )
5181- if len (s .tasks ) == 2 :
5182- assert (
5183- s .priorities ["f" ] > s .priorities ["slowinc" ]
5184- ) # lower values schedule first
5180+ future = c .submit (func , key = "f" )
5181+ while len (s .tasks ) != 2 :
5182+ await asyncio .sleep (0.001 )
5183+ # lower values schedule first
5184+ assert s .tasks ["f" ].priority > s .tasks ["slowinc" ].priority , (
5185+ s .tasks ["f" ].priority ,
5186+ s .tasks ["slowinc" ].priority ,
5187+ )
51855188
51865189
51875190def test_get_client_sync (c , s , a , b ):
You can’t perform that action at this time.
0 commit comments