Skip to content

Commit 544388f

Browse files
committed
Make LSPTestSupport build in Swift 6 mode
1 parent 4471147 commit 544388f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Sources/LSPTestSupport/TestJSONRPCConnection.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import XCTest
1717

1818
import class Foundation.Pipe
1919

20-
public final class TestJSONRPCConnection {
20+
public final class TestJSONRPCConnection: Sendable {
2121
public let clientToServer: Pipe = Pipe()
2222
public let serverToClient: Pipe = Pipe()
2323

@@ -151,7 +151,7 @@ public actor TestClient: MessageHandler {
151151
/// Send a request to the LSP server and (asynchronously) receive a reply.
152152
public nonisolated func send<Request: RequestType>(
153153
_ request: Request,
154-
reply: @escaping (LSPResult<Request.Response>) -> Void
154+
reply: @Sendable @escaping (LSPResult<Request.Response>) -> Void
155155
) -> RequestID {
156156
return connectionToServer.send(request, reply: reply)
157157
}

Tests/LanguageServerProtocolJSONRPCTests/ConnectionPerfTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ class ConnectionPerfTests: PerfTestCase {
3232
let expectation = self.expectation(description: "response received")
3333
self.startMeasuring()
3434
_ = client.send(EchoRequest(string: "hello!")) { _ in
35-
self.stopMeasuring()
3635
expectation.fulfill()
3736
}
3837

3938
wait(for: [expectation], timeout: defaultTimeout)
39+
self.stopMeasuring()
4040
}
4141
}
4242

0 commit comments

Comments
 (0)