Skip to content

Commit 6d4954a

Browse files
committed
Fix tests
1 parent 1cea53b commit 6d4954a

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

Sources/GRPCCore/Transport/ClientTransport.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public protocol ClientTransport: Sendable {
4747
/// running ``connect()``.
4848
func beginGracefulShutdown()
4949

50-
/// Opens a stream using the transport, and uses it as input into a user-provided closure.
50+
/// Opens a stream using the transport, and uses it as input into a user-provided closure alongisde the given context.
5151
///
5252
/// - Important: The opened stream is closed after the closure is finished.
5353
///

Sources/GRPCInProcessTransport/InProcessTransport+Server.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ extension InProcessTransport {
3434

3535
private let newStreams: AsyncStream<RPCStream<Inbound, Outbound>>
3636
private let newStreamsContinuation: AsyncStream<RPCStream<Inbound, Outbound>>.Continuation
37-
private let peer: String
37+
package let peer: String
3838

3939
private struct State: Sendable {
4040
private var _nextID: UInt64

Tests/GRPCCoreTests/Call/Client/Internal/ClientRPCExecutorTestSupport/ClientRPCExecutorTestHarness+Transport.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023, gRPC Authors All rights reserved.
2+
* Copyright 2023-2025, gRPC Authors All rights reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,6 +21,6 @@ extension InProcessTransport.Server {
2121
func spawnClientTransport(
2222
throttle: RetryThrottle = RetryThrottle(maxTokens: 10, tokenRatio: 0.1)
2323
) -> InProcessTransport.Client {
24-
return InProcessTransport.Client(server: self)
24+
return InProcessTransport.Client(server: self, peer: self.peer)
2525
}
2626
}

Tests/GRPCInProcessTransportTests/InProcessClientTransportTests.swift

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023, gRPC Authors All rights reserved.
2+
* Copyright 2023-2025, gRPC Authors All rights reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -198,9 +198,11 @@ final class InProcessClientTransportTests: XCTestCase {
198198
]
199199
)
200200

201+
let peer = "in-process:1234"
201202
var client = InProcessTransport.Client(
202-
server: InProcessTransport.Server(peer: "in-process:1234"),
203-
serviceConfig: serviceConfig
203+
server: InProcessTransport.Server(peer: peer),
204+
serviceConfig: serviceConfig,
205+
peer: peer
204206
)
205207

206208
let firstDescriptor = MethodDescriptor(fullyQualifiedService: "test", method: "first")
@@ -223,8 +225,9 @@ final class InProcessClientTransportTests: XCTestCase {
223225
)
224226
serviceConfig.methodConfig.append(overrideConfiguration)
225227
client = InProcessTransport.Client(
226-
server: InProcessTransport.Server(peer: "in-process:1234"),
227-
serviceConfig: serviceConfig
228+
server: InProcessTransport.Server(peer: peer),
229+
serviceConfig: serviceConfig,
230+
peer: peer
228231
)
229232

230233
let secondDescriptor = MethodDescriptor(fullyQualifiedService: "test", method: "second")
@@ -290,7 +293,8 @@ final class InProcessClientTransportTests: XCTestCase {
290293

291294
return InProcessTransport.Client(
292295
server: server,
293-
serviceConfig: serviceConfig
296+
serviceConfig: serviceConfig,
297+
peer: server.peer
294298
)
295299
}
296300
}

0 commit comments

Comments
 (0)