Skip to content

Commit 4d24cd9

Browse files
committed
Formatting
1 parent 032c0b3 commit 4d24cd9

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

Tests/GRPCInterceptorsTests/TracingInterceptorTests.swift

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
*/
1616

1717
import GRPCCore
18+
import GRPCInterceptors
19+
import Testing
1820
import Tracing
1921
import XCTest
20-
import Testing
21-
import GRPCInterceptors
2222

2323
@Suite("OTel Tracing Client Interceptor Tests")
2424
struct OTelTracingClientInterceptorTests {
@@ -53,7 +53,10 @@ struct OTelTracingClientInterceptorTests {
5353
fullyQualifiedService: "TracingInterceptorTests",
5454
method: "testClientInterceptor"
5555
)
56-
let testValues = self.getTestValues(addressType: addressType, methodDescriptor: methodDescriptor)
56+
let testValues = self.getTestValues(
57+
addressType: addressType,
58+
methodDescriptor: methodDescriptor
59+
)
5760
let response = try await interceptor.intercept(
5861
tracer: self.tracer,
5962
request: .init(producer: { writer in
@@ -158,8 +161,8 @@ struct OTelTracingClientInterceptorTests {
158161
try await assertStreamContentsEqual([["response"]], response.messages)
159162

160163
assertTestSpanComponents(forMethod: methodDescriptor) { events in
161-
#expect(events ==
162-
[
164+
#expect(
165+
events == [
163166
// Recorded when `request1` is sent
164167
TestSpanEvent("rpc.message", ["rpc.message.type": "SENT", "rpc.message.id": 1]),
165168
// Recorded when `request2` is sent
@@ -219,8 +222,8 @@ struct OTelTracingClientInterceptorTests {
219222
#expect(events.isEmpty)
220223
} assertAttributes: { attributes in
221224
// The attributes should not contain a grpc status code, as the request was never even sent.
222-
#expect(attributes ==
223-
[
225+
#expect(
226+
attributes == [
224227
"rpc.system": "grpc",
225228
"rpc.method": .string(methodDescriptor.method),
226229
"rpc.service": .string(methodDescriptor.service.fullyQualifiedService),
@@ -298,8 +301,8 @@ struct OTelTracingClientInterceptorTests {
298301
// No events are recorded
299302
#expect(events.isEmpty)
300303
} assertAttributes: { attributes in
301-
#expect(attributes ==
302-
[
304+
#expect(
305+
attributes == [
303306
"rpc.system": "grpc",
304307
"rpc.method": .string(methodDescriptor.method),
305308
"rpc.service": .string(methodDescriptor.service.fullyQualifiedService),
@@ -322,7 +325,10 @@ struct OTelTracingClientInterceptorTests {
322325

323326
// - MARK: Utilities
324327

325-
private func getTestValues(addressType: OTelTracingInterceptorTestAddressType, methodDescriptor: MethodDescriptor) -> OTelTracingInterceptorTestCaseValues {
328+
private func getTestValues(
329+
addressType: OTelTracingInterceptorTestAddressType,
330+
methodDescriptor: MethodDescriptor
331+
) -> OTelTracingInterceptorTestCaseValues {
326332
switch addressType {
327333
case .ipv4:
328334
return OTelTracingInterceptorTestCaseValues(

0 commit comments

Comments
 (0)