Skip to content

Commit 122f2e5

Browse files
committed
Update DdTraceTests
1 parent 5af47e2 commit 122f2e5

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

packages/core/ios/Tests/DdTraceTests.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,11 @@ internal class DdTraceTests: XCTestCase {
167167
}
168168
}
169169

170-
private class MockTracer: OTTracer {
170+
private final class MockTracer: OTTracer, @unchecked Sendable {
171171
var activeSpan: OTSpan?
172172

173173
private(set) var startedSpans = [MockSpan]()
174-
func startSpan(operationName: String, references: [OTReference]?, tags: [String: Encodable]?, startTime: Date?) -> OTSpan {
174+
func startSpan(operationName: String, references: [OTReference]?, tags: [String: Encodable & Sendable]?, startTime: Date?) -> OTSpan {
175175
let mockSpan = MockSpan(name: operationName, parent: nil, tags: tags, startTime: startTime)
176176
startedSpans.append(mockSpan)
177177
return mockSpan
@@ -187,21 +187,21 @@ private class MockTracer: OTTracer {
187187
// swiftlint:enable unavailable_function
188188
}
189189

190-
private class MockSpan: OTSpan {
190+
private final class MockSpan: OTSpan, @unchecked Sendable {
191191
static let unfinished: Date = .distantFuture
192192

193193
let name: String
194194
let parent: OTSpanContext?
195-
private(set) var tags: [String: Encodable]
195+
private(set) var tags: [String: Encodable & Sendable]
196196
let startTime: Date?
197-
init(name: String, parent: OTSpanContext?, tags: [String: Encodable]?, startTime: Date?) {
197+
init(name: String, parent: OTSpanContext?, tags: [String: Encodable & Sendable]?, startTime: Date?) {
198198
self.name = name
199199
self.parent = parent
200200
self.tags = tags ?? [:]
201201
self.startTime = startTime
202202
}
203203

204-
func setTag(key: String, value: Encodable) {
204+
func setTag(key: String, value: Encodable & Sendable) {
205205
tags[key] = value
206206
}
207207

@@ -225,7 +225,7 @@ private class MockSpan: OTSpan {
225225
func setOperationName(_ operationName: String) {
226226
fatalError("Should not be called")
227227
}
228-
func log(fields: [String: Encodable], timestamp: Date) {
228+
func log(fields: [String: Encodable & Sendable], timestamp: Date) {
229229
fatalError("Should not be called")
230230
}
231231
func setBaggageItem(key: String, value: String) {

0 commit comments

Comments
 (0)