Skip to content

iOS 17: added tests for simulating cancellations#2597

Merged
NachoSoto merged 2 commits into
mainfrom
xcode-15-test-cancellations
Jul 18, 2023
Merged

iOS 17: added tests for simulating cancellations#2597
NachoSoto merged 2 commits into
mainfrom
xcode-15-test-cancellations

Conversation

@NachoSoto

Copy link
Copy Markdown
Contributor

Prior to this it was not possible to simulate cancellations with SKTestSession.

Relying on the new SKTestSession.setSimulatedError (see FB10300403)

@NachoSoto NachoSoto requested a review from a team June 7, 2023 20:59
@NachoSoto NachoSoto added blocked and removed WIP labels Jun 7, 2023
@NachoSoto

Copy link
Copy Markdown
Contributor Author

For some reason the method is still not in beta 1, so we'll have to wait for now.

@NachoSoto NachoSoto changed the title Xcode 15: added tests for simulating cancellations [WIP] iOS 17: added tests for simulating cancellations Jun 8, 2023
@NachoSoto NachoSoto force-pushed the xcode-15-test-cancellations branch from 3c366fc to d9e190a Compare June 21, 2023 23:17
@NachoSoto

Copy link
Copy Markdown
Contributor Author

Prior to this it was not possible to simulate cancellations with `SKTestSession`.
Relying on the new [`SKTestSession.setSimulatedError`](https://developer.apple.com/documentation/storekittest/sktestsession/4196369-setsimulatederror) (see `FB10300403`)
@NachoSoto NachoSoto force-pushed the xcode-15-test-cancellations branch from d9e190a to 6286177 Compare July 14, 2023 15:45
@NachoSoto NachoSoto changed the title [WIP] iOS 17: added tests for simulating cancellations iOS 17: added tests for simulating cancellations Jul 14, 2023
@NachoSoto NachoSoto removed the blocked label Jul 14, 2023
@NachoSoto

Copy link
Copy Markdown
Contributor Author

This is ready now.

@NachoSoto NachoSoto marked this pull request as ready for review July 14, 2023 15:45
@NachoSoto NachoSoto force-pushed the xcode-15-test-cancellations branch from 0e5f0c4 to 79592a5 Compare July 14, 2023 16:16
@codecov

codecov Bot commented Jul 14, 2023

Copy link
Copy Markdown

Codecov Report

Merging #2597 (79592a5) into main (e2ecdd0) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #2597   +/-   ##
=======================================
  Coverage   86.54%   86.54%           
=======================================
  Files         215      215           
  Lines       15484    15484           
=======================================
  Hits        13400    13400           
  Misses       2084     2084           

see 4 files with indirect coverage changes

@NachoSoto NachoSoto merged commit 73d914f into main Jul 18, 2023
@NachoSoto NachoSoto deleted the xcode-15-test-cancellations branch July 18, 2023 13:08
NachoSoto added a commit that referenced this pull request Jul 19, 2023
**This is an automatic release.**

### Dependency Updates
* Bump fastlane from 2.213.0 to 2.214.0 (#2824) via dependabot[bot]
(@dependabot[bot])
### Other Changes
* `MainThreadMonitor`: don't crash if there is no test in progress
(#2838) via NachoSoto (@NachoSoto)
* `CI`: fixed Fastlane APITester lanes (#2836) via NachoSoto
(@NachoSoto)
* `Integration Tests`: workaround Swift runtime crash (#2826) via
NachoSoto (@NachoSoto)
* `@EnsureNonEmptyArrayDecodable` (#2831) via NachoSoto (@NachoSoto)
* `iOS 17`: added tests for simulating cancellations (#2597) via
NachoSoto (@NachoSoto)
* `CI`: make all `Codecov` jobs `informational` (#2828) via NachoSoto
(@NachoSoto)
* `MainThreadMonitor`: check deadlocks only ever N seconds (#2820) via
NachoSoto (@NachoSoto)
* New `@NonEmptyStringDecodable` (#2819) via NachoSoto (@NachoSoto)
* `MockDeviceCache`: avoid using real `UserDefaults` (#2814) via
NachoSoto (@NachoSoto)
* `throwAssertion`: fixed Xcode 15 compilation (#2813) via NachoSoto
(@NachoSoto)
* `CustomEntitlementsComputation`: fixed API testers (#2815) via
NachoSoto (@NachoSoto)
* `PackageTypeTests`: fixed iOS 12 (#2807) via NachoSoto (@NachoSoto)
* `Tests`: avoid race-condition in leak detection (#2806) via NachoSoto
(@NachoSoto)
* Revert "`Unit Tests`: removed leak detection" (#2805) via NachoSoto
(@NachoSoto)
* `PackageType: Codable` implementation (#2797) via NachoSoto
(@NachoSoto)
* `SystemInfo.init` no longer `throws` (#2803) via NachoSoto
(@NachoSoto)
* `Trusted Entitlements`: add support for signing `POST` body (#2753)
via NachoSoto (@NachoSoto)
* `Tests`: unified default timeouts (#2801) via NachoSoto (@NachoSoto)
* `Tests`: removed forced-unwrap (#2799) via NachoSoto (@NachoSoto)
* `Tests`: added missing `super.setUp()` (#2804) via NachoSoto
(@NachoSoto)
* Replaced `FatalErrorUtil` with `Nimble` (#2802) via NachoSoto
(@NachoSoto)
* `Tests`: fixed another flaky test (#2795) via NachoSoto (@NachoSoto)
* `TimingUtil`: improved tests by using `Clock` (#2794) via NachoSoto
(@NachoSoto)
* `IgnoreDecodeErrors`: log decoding error (#2778) via NachoSoto
(@NachoSoto)
* `TestLogHandler`: changed all tests to explicitly deinitialize it
(#2784) via NachoSoto (@NachoSoto)
* `LocalReceiptParserStoreKitTests`: fixed flaky test failure (#2785)
via NachoSoto (@NachoSoto)
* `Unit Tests`: removed leak detection (#2792) via NachoSoto
(@NachoSoto)
* `Tests`: fixed another flaky failure with asynchronous check (#2786)
via NachoSoto (@NachoSoto)

---------

Co-authored-by: NachoSoto <ignaciosoto90@gmail.com>
NachoSoto added a commit that referenced this pull request Jul 20, 2023
Follow up to #2597.
When we implemented #2449 we couldn't add tests for that different in behavior. This can be reflected with this test now.
NachoSoto added a commit that referenced this pull request Jul 21, 2023
…ons (#2849)

Follow up to #2597.

When we implemented #2449 we couldn't add tests for that difference in
behavior. This can be reflected with this test now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants