Skip to content

Commit 8eeb807

Browse files
committed
fixup tests
1 parent b52653f commit 8eeb807

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

Tests/GRPCHealthServiceTests/HealthTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ import XCTest
2121

2222
final class HealthTests: XCTestCase {
2323
private func withHealthClient(
24-
_ body: @Sendable (Grpc_Health_V1_Health_Client, Health.Provider) async throws -> Void
24+
_ body: @Sendable (Grpc_Health_V1_Health.Client, Health.Provider) async throws -> Void
2525
) async throws {
2626
let health = Health()
2727
let inProcess = InProcessTransport()
2828
let server = GRPCServer(transport: inProcess.server, services: [health.service])
2929
let client = GRPCClient(transport: inProcess.client)
30-
let healthClient = Grpc_Health_V1_Health_Client(wrapping: client)
30+
let healthClient = Grpc_Health_V1_Health.Client(wrapping: client)
3131

3232
try await withThrowingDiscardingTaskGroup { group in
3333
group.addTask {

Tests/GRPCInterceptorsTests/TracingInterceptorTests.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ final class TracingInterceptorTests: XCTestCase {
3737
// This is blocked on: https://github.com/apple/swift-service-context/pull/46
3838
try await ServiceContext.$current.withValue(serviceContext) {
3939
let methodDescriptor = MethodDescriptor(
40-
service: "TracingInterceptorTests",
40+
fullyQualifiedService: "TracingInterceptorTests",
4141
method: "testClientInterceptor"
4242
)
4343
let response = try await interceptor.intercept(
@@ -95,7 +95,7 @@ final class TracingInterceptorTests: XCTestCase {
9595

9696
func testClientInterceptorAllEventsRecorded() async throws {
9797
let methodDescriptor = MethodDescriptor(
98-
service: "TracingInterceptorTests",
98+
fullyQualifiedService: "TracingInterceptorTests",
9999
method: "testClientInterceptorAllEventsRecorded"
100100
)
101101
var serviceContext = ServiceContext.topLevel
@@ -174,14 +174,14 @@ final class TracingInterceptorTests: XCTestCase {
174174

175175
func testServerInterceptorErrorResponse() async throws {
176176
let methodDescriptor = MethodDescriptor(
177-
service: "TracingInterceptorTests",
177+
fullyQualifiedService: "TracingInterceptorTests",
178178
method: "testServerInterceptorErrorResponse"
179179
)
180180
let interceptor = ServerTracingInterceptor(emitEventOnEachWrite: false)
181181
let single = ServerRequest(metadata: ["trace-id": "some-trace-id"], message: [UInt8]())
182182
let response = try await interceptor.intercept(
183183
request: .init(single: single),
184-
context: .init(descriptor: methodDescriptor, cancellation: .init())
184+
context: .init(descriptor: methodDescriptor, peer: "", cancellation: .init())
185185
) { _, _ in
186186
StreamingServerResponse<String>(error: .init(code: .unknown, message: "Test error"))
187187
}
@@ -202,15 +202,15 @@ final class TracingInterceptorTests: XCTestCase {
202202

203203
func testServerInterceptor() async throws {
204204
let methodDescriptor = MethodDescriptor(
205-
service: "TracingInterceptorTests",
205+
fullyQualifiedService: "TracingInterceptorTests",
206206
method: "testServerInterceptor"
207207
)
208208
let (stream, continuation) = AsyncStream<String>.makeStream()
209209
let interceptor = ServerTracingInterceptor(emitEventOnEachWrite: false)
210210
let single = ServerRequest(metadata: ["trace-id": "some-trace-id"], message: [UInt8]())
211211
let response = try await interceptor.intercept(
212212
request: .init(single: single),
213-
context: .init(descriptor: methodDescriptor, cancellation: .init())
213+
context: .init(descriptor: methodDescriptor, peer: "", cancellation: .init())
214214
) { _, _ in
215215
{ [serviceContext = ServiceContext.current] in
216216
return StreamingServerResponse<String>(
@@ -267,15 +267,15 @@ final class TracingInterceptorTests: XCTestCase {
267267

268268
func testServerInterceptorAllEventsRecorded() async throws {
269269
let methodDescriptor = MethodDescriptor(
270-
service: "TracingInterceptorTests",
270+
fullyQualifiedService: "TracingInterceptorTests",
271271
method: "testServerInterceptorAllEventsRecorded"
272272
)
273273
let (stream, continuation) = AsyncStream<String>.makeStream()
274274
let interceptor = ServerTracingInterceptor(emitEventOnEachWrite: true)
275275
let single = ServerRequest(metadata: ["trace-id": "some-trace-id"], message: [UInt8]())
276276
let response = try await interceptor.intercept(
277277
request: .init(single: single),
278-
context: .init(descriptor: methodDescriptor, cancellation: .init())
278+
context: .init(descriptor: methodDescriptor, peer: "", cancellation: .init())
279279
) { _, _ in
280280
{ [serviceContext = ServiceContext.current] in
281281
return StreamingServerResponse<String>(

0 commit comments

Comments
 (0)