julia
49ef56ec - test: Do not assume threaded completion order (#62795)

Commit
27 days ago
test: Do not assume threaded completion order (#62795) The `Threads.foreach(f, ::Channel)` testset in `test/threads_exec.jl` asserts that with `ntasks=10` the results come back in a different order from the input (`@test expected != unordered_fair` / `!= unordered_static`). That is a statement about scheduling luck, not `Threads.foreach` semantics: nothing guarantees that multiple tasks complete items out of order. The retry of the coverage PR's [x86_64-linux-gnuassertrr job](https://buildkite.com/julialang/julia-pr/builds/1472#01a00201-1630-466d-b4ad-8f2cb0ce31e5) failed in the `JULIA_NUM_THREADS=1,1` pass when the fair schedule happened to preserve input order: ``` Test Failed at test/threads_exec.jl:1139 Expression: expected != unordered_fair ``` Remove the two scheduling-sensitive checks. The single-worker ordering checks (`ntasks=1` must preserve order) and multiset-equality checks remain. Assisted by: Fable & Sol Co-authored-by: OpenAI Codex <noreply@openai.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Author
Parents
Loading