@@ -110,7 +110,7 @@ public typealias KnownIssueMatcher = @Sendable (_ issue: Issue) -> Bool
110
110
/// Because all errors thrown by `body` are caught as known issues, this
111
111
/// function is not throwing. If only some errors or issues are known to occur
112
112
/// while others should continue to cause test failures, use
113
- /// ``withKnownIssue(_:isIntermittent:sourceLocation:_:when:matching:)-5vi5n ``
113
+ /// ``withKnownIssue(_:isIntermittent:sourceLocation:_:when:matching:)``
114
114
/// instead.
115
115
public func withKnownIssue(
116
116
_ comment: Comment ? = nil ,
@@ -161,7 +161,7 @@ public func withKnownIssue(
161
161
///
162
162
/// It is not necessary to specify both `precondition` and `issueMatcher` if
163
163
/// only one is relevant. If all errors and issues should be considered known
164
- /// issues, use ``withKnownIssue(_:isIntermittent:sourceLocation:_:)-95r6o ``
164
+ /// issues, use ``withKnownIssue(_:isIntermittent:sourceLocation:_:)``
165
165
/// instead.
166
166
///
167
167
/// - Note: `issueMatcher` may be invoked more than once for the same issue.
@@ -200,6 +200,7 @@ public func withKnownIssue(
200
200
/// - isIntermittent: Whether or not the known issue occurs intermittently. If
201
201
/// this argument is `true` and the known issue does not occur, no secondary
202
202
/// issue is recorded.
203
+ /// - isolation: The actor to which `body` is isolated, if any.
203
204
/// - sourceLocation: The source location to which any recorded issues should
204
205
/// be attributed.
205
206
/// - body: The function to invoke.
@@ -218,15 +219,16 @@ public func withKnownIssue(
218
219
/// Because all errors thrown by `body` are caught as known issues, this
219
220
/// function is not throwing. If only some errors or issues are known to occur
220
221
/// while others should continue to cause test failures, use
221
- /// ``withKnownIssue(_:isIntermittent:sourceLocation:_:when:matching:)-47y3z ``
222
+ /// ``withKnownIssue(_:isIntermittent:isolation: sourceLocation:_:when:matching:)``
222
223
/// instead.
223
224
public func withKnownIssue(
224
225
_ comment: Comment ? = nil ,
225
226
isIntermittent: Bool = false ,
227
+ isolation: isolated ( any Actor ) ? = #isolation,
226
228
sourceLocation: SourceLocation = #_sourceLocation,
227
229
_ body: ( ) async throws -> Void
228
230
) async {
229
- try ? await withKnownIssue ( comment, isIntermittent: isIntermittent, sourceLocation: sourceLocation, body, matching: { _ in true } )
231
+ try ? await withKnownIssue ( comment, isIntermittent: isIntermittent, isolation : isolation , sourceLocation: sourceLocation, body, matching: { _ in true } )
230
232
}
231
233
232
234
/// Invoke a function that has a known issue that is expected to occur during
@@ -237,6 +239,7 @@ public func withKnownIssue(
237
239
/// - isIntermittent: Whether or not the known issue occurs intermittently. If
238
240
/// this argument is `true` and the known issue does not occur, no secondary
239
241
/// issue is recorded.
242
+ /// - isolation: The actor to which `body` is isolated, if any.
240
243
/// - sourceLocation: The source location to which any recorded issues should
241
244
/// be attributed.
242
245
/// - body: The function to invoke.
@@ -269,13 +272,14 @@ public func withKnownIssue(
269
272
///
270
273
/// It is not necessary to specify both `precondition` and `issueMatcher` if
271
274
/// only one is relevant. If all errors and issues should be considered known
272
- /// issues, use ``withKnownIssue(_:isIntermittent:sourceLocation:_:)-3g6b7 ``
275
+ /// issues, use ``withKnownIssue(_:isIntermittent:isolation: sourceLocation:_:when:matching:) ``
273
276
/// instead.
274
277
///
275
278
/// - Note: `issueMatcher` may be invoked more than once for the same issue.
276
279
public func withKnownIssue(
277
280
_ comment: Comment ? = nil ,
278
281
isIntermittent: Bool = false ,
282
+ isolation: isolated ( any Actor ) ? = #isolation,
279
283
sourceLocation: SourceLocation = #_sourceLocation,
280
284
_ body: ( ) async throws -> Void ,
281
285
when precondition: ( ) async -> Bool = { true } ,
0 commit comments