@@ -21,6 +21,21 @@ def test_trivial_workload_should_not_cause_work_stealing(small_client):
21
21
small_client .gather (futs )
22
22
23
23
24
+ @run_up_to_nthreads ("small_cluster" , 100 , reason = "fixed dataset" )
25
+ def test_work_stealing_on_inhomogeneous_workload (small_client ):
26
+ np .random .seed (42 )
27
+ delays = np .random .lognormal (1 , 1.3 , 500 )
28
+
29
+ @delayed
30
+ def clog (n ):
31
+ time .sleep (min (n , 60 ))
32
+ return n
33
+
34
+ results = [clog (i ) for i in delays ]
35
+ futs = small_client .compute (results )
36
+ small_client .gather (futs )
37
+
38
+
24
39
@run_up_to_nthreads ("small_cluster" , 50 , reason = "fixed dataset" )
25
40
@pytest .mark .xfail (
26
41
Version (distributed .__version__ ) < Version ("2022.6.1" ),
@@ -70,21 +85,6 @@ def func2(chunk):
70
85
_ = future .result ()
71
86
72
87
73
- @run_up_to_nthreads ("small_cluster" , 100 , reason = "fixed dataset" )
74
- def test_work_stealing_on_inhomogeneous_workload (small_client ):
75
- np .random .seed (42 )
76
- delays = np .random .lognormal (1 , 1.3 , 500 )
77
-
78
- @delayed
79
- def clog (n ):
80
- time .sleep (min (n , 60 ))
81
- return n
82
-
83
- results = [clog (i ) for i in delays ]
84
- futs = small_client .compute (results )
85
- small_client .gather (futs )
86
-
87
-
88
88
@run_up_to_nthreads ("small_cluster" , 100 , reason = "fixed dataset" )
89
89
def test_work_stealing_on_straggling_worker (
90
90
test_name_uuid ,
0 commit comments