Skip to content

Commit 755886b

Browse files
committed
Increase timeout duration in testSourcekitdTimeout
The 1s we allowed for the second (fast) diagnostics request was not sufficient on Windows in some runs. Increase the timeout to 3s.
1 parent 9e9579d commit 755886b

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)