mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
The assertion in this test was too strict. Even if the high priority tasks are scheduled first, they might finish after the low priority tasks (both high-priority and low-priority tasks sleep 100ms in these tests). For example the following is a valid recording of executions. ``` Set([high(0)]) Set([high(1), high(0)]) Set([high(1), high(2), high(0)]) Set([high(2), high(0), high(3), high(1)]) Set([high(2), high(3), high(1)]) Set([high(2), high(1)]) Set([high(2)]) Set([]) Set([high(4)]) Set([high(5), high(4)]) Set([high(6), high(5), high(4)]) Set([high(6), high(5), high(7), high(4)]) Set([high(6), high(5), high(7)]) Set([high(5), high(7)]) Set([high(5)]) Set([]) Set([high(8)]) Set([high(8), high(9)]) Set([high(8), high(9), low(0)]) Set([high(8), high(9), low(0), low(1)]) Set([high(8), high(9), low(0)]) Set([high(8), high(9)]) Set([high(9)]) ``` Change the assertion to check that all high-priority tasks start executing before the first low-priority task starts executing. rdar://145660858