This test can sometimes fail in CI if sourcekitd takes too long to cancel:
Test Case 'LifecycleTests.testCancellation' started at 2026-10-02 06:56:58.507
C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\sourcekit-lsp\Tests\SourceKitLSPTests\LifecycleTests.swift:144: error: LifecycleTests.testCancellation : XCTAssertLessThan failed: ("2.8379554748535156") is not less than ("2.0") - Cursor info request wasn't fast. sourcekitd still blocked?
Test Case 'LifecycleTests.testCancellation' failed (3.865 seconds)
The intention of the test is to ensure that type-checking cancellation works and can interrupt the constraint solver (ensuring it doesn't block future semantic requests). There are a few things we should do to make this more reliable:
- We should replace the slow expression with a flag that simulates a slow expression in the type-checker
- We should change the expectation to simply be "did we cancel before the simulated slow expression finished". Since it will be simulated we can make it take a long enough time to be reliable
This test can sometimes fail in CI if sourcekitd takes too long to cancel:
The intention of the test is to ensure that type-checking cancellation works and can interrupt the constraint solver (ensuring it doesn't block future semantic requests). There are a few things we should do to make this more reliable: