Skip to content

Commit 4cbf2de

Browse files
authored
Merge pull request #1778 from ahoppen/cancellation-check-duration
2 parents 1478559 + 94a4266 commit 4cbf2de

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Tests/SourceKitLSPTests/BackgroundIndexingTests.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,9 +1451,11 @@ final class BackgroundIndexingTests: XCTestCase {
14511451
// Preparation of `Test.swift` should finish instantly because it doesn't type check the function body.
14521452
// Type-checking of `slow()` should be slow because the expression has exponential complexity in the type checker.
14531453
// We should hit the timeout of 1s. Adding another 2s to escalate a SIGINT (to which swift-frontend doesn't respond)
1454-
// to a SIGKILL mean that the initial indexing should be done in ~3s. 30s should be enough to always finish within
1455-
// this time while also testing that we don't wait for type checking of Test.swift to finish.
1456-
XCTAssert(Date().timeIntervalSince(dateStarted) < 30)
1454+
// to a SIGKILL mean that the initial indexing should be done in ~3s. 90s should be enough to always finish within
1455+
// this time while also testing that we don't wait for type checking of Test.swift to finish, even on slow CI
1456+
// systems where package loading might take a while and just calling `swift build` to prepare `Test.swift` also has
1457+
// a delay.
1458+
XCTAssertLessThan(Date().timeIntervalSince(dateStarted), 90)
14571459
}
14581460

14591461
func testRedirectSymlink() async throws {

0 commit comments

Comments
 (0)