Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-14766] Basic Async Test Case Fails #345

Closed
swift-ci opened this issue Jun 12, 2021 · 3 comments
Closed

[SR-14766] Basic Async Test Case Fails #345

swift-ci opened this issue Jun 12, 2021 · 3 comments

Comments

@swift-ci
Copy link

Previous ID SR-14766
Radar rdar://problem/79227241
Original Reporter rnantes (JIRA User)
Type Bug
Status Resolved
Resolution Cannot Reproduce

Attachment: Download

Environment

Xcode 13 Beta 1. MacOS 11.4. Late 2016 Macbook pro.

Additional Detail from JIRA
Votes 0
Component/s XCTest
Labels Bug
Assignee rnantes (JIRA)
Priority Medium

md5: 1ea5a71dd5ad3313febb25ba67e6aa61

Issue Description:

A basic Async test case fails in Xcode 13 beta 1. See code on github

final class ConcurrencyCrashTests: XCTestCase {


    // this crashes
    func testSimpleConcurrency() async throws {
        let res = await aConcurrentFunc()
        XCTAssertEqual(res, "hi")
    }


    func aConcurrentFunc() async -> String {
        return "hi"
    }
}
@ktoso
Copy link
Member

ktoso commented Jun 12, 2021

@swift-ci create

@stmontgomery
Copy link
Contributor

Are you running this test on macOS 11.4? See this note from the Xcode 13 Beta Release Notes:

  • Swift test methods with the async keyword may crash when run in macOS 11, iOS 14, tvOS 14, or watchOS 7 or earlier. (76552035)

Workaround: Run the tests in macOS 12, iOS 15, tvOS 15, or watchOS 8 or later. Alternatively, raise the deployment target of test bundle targets containing async Swift tests to these versions.

@stmontgomery
Copy link
Contributor

Marking as Cannot Reproduce since I am not seeing this when running on iOS 15 Beta, but see my earlier comment about how this is not supported on older Apple OSes

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 9, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants