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

[Plat-11665] New mazerunner api #1639

Merged
merged 18 commits into from
Mar 27, 2024
Merged

[Plat-11665] New mazerunner api #1639

merged 18 commits into from
Mar 27, 2024

Conversation

kstenerud
Copy link
Contributor

@kstenerud kstenerud commented Mar 18, 2024

Goal

Update this repo to use the new idempotent mazerunner API so that we can reduce the number of flakes.

Design

This follows the same approach as used in bugsnag-cocoa-performance, with the added twist that we store the most recent maze runner command UUID in NSUserDefaults so that the data survives app restarts (because we are deliberately crashing the app).

Changes

This PR unfortunately has a huge number of changed files, but most of them are very small, repetitive changes.

  • Every scenario has been modified to override configure instead of configuring in the startBugsnag method. This accounts for most of the changed files. Some scenarios have been updated to become more robust to the new timing.
  • The various .feature files needed to be updated for the different timing we now have, and to remove some old workarounds that are no longer relevant.
  • macOSTestApp and iosTestApp saw the most big changes in order to make them use the Fixture class rather than driving things itself.
  • eventMode has been removed, and instead every command takes a list of arguments. For example in AppHangScenario.swift, TimeInterval(eventMode!)! is now TimeInterval(args[0])!.
  • performBlockAndWaitForEventDelivery has been replaced with waitForEventDelivery:andThen because the old approach blocked the main thread, which can cause the app to hang. Similarly for performBlockAndWaitForSessionDelivery
  • All scenario and fixture configuration has been moved into FixtureConfig.
  • CommandReaderThread.swift, Fixture.swift, and MazeRunnerCommand.swift are copied from BugsnagPerformance with a few minor changes.

Testing

There is no new functionality - We're just changing the testing rig.

Copy link

Bugsnag.framework binary size did not change - 713,264 bytes

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  [ = ]       0  [ = ]       0    TOTAL

Generated by 🚫 Danger

@twometresteve twometresteve removed their request for review March 20, 2024 08:54
@kstenerud kstenerud force-pushed the PLAT-11665-new-mazerunner-api branch from d56b432 to 18837b2 Compare March 20, 2024 10:29
@kstenerud kstenerud force-pushed the PLAT-11665-new-mazerunner-api branch from 8e56361 to e5489f2 Compare March 20, 2024 15:08
@kstenerud kstenerud force-pushed the PLAT-11665-new-mazerunner-api branch from ff13fa1 to f87c6dc Compare March 21, 2024 08:18
Copy link
Contributor

@twometresteve twometresteve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great change!

@kstenerud kstenerud merged commit 0937b64 into next Mar 27, 2024
31 checks passed
@kstenerud kstenerud deleted the PLAT-11665-new-mazerunner-api branch March 27, 2024 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants