From 7f0f8dad651a2a8f4ddd90c522f588ed620017a4 Mon Sep 17 00:00:00 2001 From: Jonathan Grynspan Date: Tue, 24 Sep 2024 15:57:40 -0400 Subject: [PATCH] Fix a test marked `@MainActor` but not `async`. SPM and swift-corelibs-xctest do not support main-actor-isolated tests unless they are marked `async` because the compilation stage that finds tests is not actor-aware. This test is preventing us from merging https://github.com/swiftlang/swift-package-manager/pull/7967. --- Tests/Foundation/TestURLSession.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/Foundation/TestURLSession.swift b/Tests/Foundation/TestURLSession.swift index 29b71407c6..91dd6847c6 100644 --- a/Tests/Foundation/TestURLSession.swift +++ b/Tests/Foundation/TestURLSession.swift @@ -410,7 +410,7 @@ final class TestURLSession: LoopbackServerTest, @unchecked Sendable { } } - func test_taskCopy() { + func test_taskCopy() async { let url = URL(string: "http://127.0.0.1:\(TestURLSession.serverPort)/Nepal")! let session = URLSession(configuration: URLSessionConfiguration.default, delegate: nil,