Files
sourcekit-lsp/Tests/SemanticIndexTests
Alex Hoppen a32be44026 Fix race condition in testHighPriorityTasksGetExecutedBeforeLowPriorityTasks
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
2025-02-26 09:57:05 -08:00
..