Skip to content

Commit 2623b49

Browse files
committed
Use the test’s default timeout duration for sourcekitd timeouts
Otherwise, we are stuck with the timeout default of 120s and the test runner can’t increase it.
1 parent 3bf05ad commit 2623b49

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Sources/SKTestSupport/TestSourceKitLSPClient.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ package final class TestSourceKitLSPClient: MessageHandler, Sendable {
130130
(options.swiftPMOrDefault.swiftCompilerFlags ?? []) + ["-module-cache-path", globalModuleCache.path]
131131
}
132132
options.backgroundIndexing = enableBackgroundIndexing
133+
if options.sourcekitdRequestTimeout == nil {
134+
options.sourcekitdRequestTimeout = defaultTimeout
135+
}
133136

134137
var notificationYielder: AsyncStream<any NotificationType>.Continuation!
135138
self.notifications = AsyncStream { continuation in

0 commit comments

Comments
 (0)