Commit 736b73d
committed
test(agent-rearrange): patch the executor the module actually uses
The three batch_run concurrency tests patch
swarms.structs.agent_rearrange.ThreadPoolExecutor, a name the module stopped
binding when kyegomez#2078 switched it to ContextThreadPoolExecutor. mock.patch raises
AttributeError before the test body runs, so all three have been failing on
master and the concurrency guarantee they exist to guard has had no working
coverage since.
Patch ContextThreadPoolExecutor instead, and drop the __import__ dance for a
plain import.
Verified with teeth: replacing batch_run's executor block with a sequential
loop fails all three. Before this change they errored identically whatever the
source did.1 parent 6d9e61d commit 736b73d
1 file changed
Lines changed: 10 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
1018 | 1019 | | |
1019 | 1020 | | |
1020 | 1021 | | |
1021 | | - | |
| 1022 | + | |
1022 | 1023 | | |
1023 | 1024 | | |
1024 | 1025 | | |
1025 | 1026 | | |
1026 | | - | |
1027 | | - | |
1028 | | - | |
1029 | | - | |
| 1027 | + | |
| 1028 | + | |
1030 | 1029 | | |
1031 | 1030 | | |
1032 | 1031 | | |
1033 | 1032 | | |
1034 | 1033 | | |
1035 | | - | |
| 1034 | + | |
1036 | 1035 | | |
1037 | 1036 | | |
1038 | 1037 | | |
1039 | 1038 | | |
1040 | | - | |
1041 | | - | |
1042 | | - | |
1043 | | - | |
| 1039 | + | |
| 1040 | + | |
1044 | 1041 | | |
1045 | 1042 | | |
1046 | 1043 | | |
| |||
1204 | 1201 | | |
1205 | 1202 | | |
1206 | 1203 | | |
1207 | | - | |
| 1204 | + | |
1208 | 1205 | | |
1209 | 1206 | | |
1210 | | - | |
1211 | | - | |
1212 | | - | |
1213 | | - | |
| 1207 | + | |
| 1208 | + | |
1214 | 1209 | | |
1215 | 1210 | | |
1216 | 1211 | | |
| |||
0 commit comments