Skip to content

Commit eaf8439

Browse files
Sean Olszewskistmontgomery
andauthored
Update Sources/XCTest/Public/XCTestCase.TearDownBlocksState.swift
Co-authored-by: Stuart Montgomery <smontgomery@apple.com>
1 parent 55f88c5 commit eaf8439

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Sources/XCTest/Public/XCTestCase.TearDownBlocksState.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,8 @@ extension XCTestCase {
2323

2424
@available(macOS 12, *)
2525
func append(_ block: @Sendable @escaping () async throws -> Void) {
26-
XCTWaiter.subsystemQueue.sync {
27-
precondition(wasFinalized == false, "API violation -- attempting to add a teardown block after teardown blocks have been dequeued")
28-
blocks.append {
29-
try awaitUsingExpectation { try await block() }
30-
}
26+
self.append {
27+
try awaitUsingExpectation { try await block() }
3128
}
3229
}
3330

0 commit comments

Comments
 (0)