You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
0 commit comments