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

Integration Tests: workaround for XCTest crash after a test failure #2532

Merged
merged 1 commit into from
May 24, 2023

Commits on May 23, 2023

  1. Integration Tests: workaround for XCTest crash after a test failure

    See https://app.circleci.com/jobs/github/RevenueCat/purchases-ios/69881
    
    Assertion failures in that method were leading to _crashes_ in `Purchases.shared`, instead of a simple test failure that could be retried.
    
    For some reason, `XCTest` is continuing execution after an assertion failure in an `async` method, despite having `self.continueAfterFailure = false`.
    This might even be a Swift mis-compilation. This PR is a workaround: instead of relying on `XCTest` stopping execution of the test, we instead throw an `Error` to force that at compile time.
    
    Note that this still produces nice errors when an assertion fails inside of `verifyEntitlementWentThrough`:
    NachoSoto committed May 23, 2023
    Configuration menu
    Copy the full SHA
    2a5f648 View commit details
    Browse the repository at this point in the history