Skip to content

Commit 57f92b6

Browse files
authored
Merge pull request #1784 from ahoppen/sourcekitd-timeout-test
Increase timeout duration in `testSourcekitdTimeout`
2 parents f2c1c9d + 755886b commit 57f92b6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Tests/SourceKitLSPTests/LocalSwiftTests.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,9 +1426,13 @@ final class LocalSwiftTests: XCTestCase {
14261426
}
14271427

14281428
func testSourceKitdTimeout() async throws {
1429-
var options = SourceKitLSPOptions.testDefault()
1430-
options.sourcekitdRequestTimeout = 1 /* second */
1429+
try SkipUnless.longTestsEnabled()
14311430

1431+
var options = SourceKitLSPOptions.testDefault()
1432+
// This is how long we wait until implicitly cancelling the first diagnostics request.
1433+
// It needs to be long enough so we can compute diagnostics for the second requests.
1434+
// 1s is not sufficient on Windows for that.
1435+
options.sourcekitdRequestTimeout = 3 /* seconds */
14321436
let testClient = try await TestSourceKitLSPClient(options: options)
14331437
let uri = DocumentURI(for: .swift)
14341438

0 commit comments

Comments
 (0)