)]}'
{
  "commit": "e687d5732fa4dd0cf3b5f865259317d3de640a7f",
  "tree": "2fa72e0971bd44b09a77d982cb36d713fa3bd76e",
  "parents": [
    "692f1314ae541e5f1e660a9e9430c9e22f8fd6e7"
  ],
  "author": {
    "name": "Chris Bracken",
    "email": "chris@bracken.jp",
    "time": "Tue Nov 07 23:50:31 2023 -0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Nov 07 23:50:31 2023 -0800"
  },
  "message": "[macOS] Clean up resources in ViewController tests (#47792)\n\nWraps all FlutterViewController tests in an autorelease pool to ensure\r\nresources are cleaned up.\r\n\r\nAdds a MockFlutterEngineTest subclass of AutoreleasePoolTest that\r\ncreates an OCPartialMock FlutterEngine and shuts it down at the end of\r\nthe test. Previously we were not shutting down any FlutterEngine\r\ninstances we allocated, resulting in potentially thousands of threads\r\nand graphics contexts being allocated.\r\n\r\nPrior to this change, running these tests via:\r\n\r\n    ../out/host_debug_unopt_arm64/flutter_desktop_darwin_unittests \\\r\n        --gtest_filter\u003d\u0027FlutterViewController.*\u0027 --gtest_repeat\u003d1000\r\n\r\nresulted in test failures and sometimes segfaults. This ensures\r\nresources are cleaned up\r\n\r\nEventually all unit tests should configure their FlutterEngine via\r\neither FlutterEngineTest (which should be an AutoreleasePoolTest) or\r\nMockFlutterEngineTest, and the CreateMockFlutterEngine function moved to\r\na static used in the implementation of these.\r\n\r\nIssue: https://github.com/flutter/flutter/issues/104789\r\nIssue: https://github.com/flutter/flutter/issues/127441\r\nIssue: https://github.com/flutter/flutter/issues/124840\r\n\r\n## Pre-launch Checklist\r\n\r\n- [x] I read the [Contributor Guide] and followed the process outlined\r\nthere for submitting PRs.\r\n- [x] I read the [Tree Hygiene] wiki page, which explains my\r\nresponsibilities.\r\n- [x] I read and followed the [Flutter Style Guide] and the [C++,\r\nObjective-C, Java style guides].\r\n- [x] I listed at least one issue that this PR fixes in the description\r\nabove.\r\n- [x] I added new tests to check the change I am making or feature I am\r\nadding, or the PR is [test-exempt]. See [testing the engine] for\r\ninstructions on writing and running engine tests.\r\n- [x] I updated/added relevant documentation (doc comments with `///`).\r\n- [x] I signed the [CLA].\r\n- [x] All existing and new tests are passing.\r\n\r\nIf you need help, consider asking for advice on the #hackers-new channel\r\non [Discord].\r\n\r\n\u003c!-- Links --\u003e\r\n[Contributor Guide]:\r\nhttps://github.com/flutter/flutter/wiki/Tree-hygiene#overview\r\n[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene\r\n[test-exempt]:\r\nhttps://github.com/flutter/flutter/wiki/Tree-hygiene#tests\r\n[Flutter Style Guide]:\r\nhttps://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo\r\n[C++, Objective-C, Java style guides]:\r\nhttps://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style\r\n[testing the engine]:\r\nhttps://github.com/flutter/flutter/wiki/Testing-the-engine\r\n[CLA]: https://cla.developers.google.com/\r\n[flutter/tests]: https://github.com/flutter/tests\r\n[breaking change policy]:\r\nhttps://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes\r\n[Discord]: https://github.com/flutter/flutter/wiki/Chat",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b52524cd9dec5c7aefcf8b15c1ccdcb191a59cf4",
      "old_mode": 33188,
      "old_path": "shell/platform/darwin/macos/framework/Source/FlutterEngineTestUtils.h",
      "new_id": "a0a58d4516d825c326f2474155a27cf935962fea",
      "new_mode": 33188,
      "new_path": "shell/platform/darwin/macos/framework/Source/FlutterEngineTestUtils.h"
    },
    {
      "type": "modify",
      "old_id": "8a535aa5e22e1ed11f9f25ec8290313dbf5d42f9",
      "old_mode": 33188,
      "old_path": "shell/platform/darwin/macos/framework/Source/FlutterEngineTestUtils.mm",
      "new_id": "5e7ba44471ef17c0398d8dcfa47b2f2d09355ee7",
      "new_mode": 33188,
      "new_path": "shell/platform/darwin/macos/framework/Source/FlutterEngineTestUtils.mm"
    },
    {
      "type": "modify",
      "old_id": "e5f5befd2ff2a2464d4233dde12ea0d0a2685262",
      "old_mode": 33188,
      "old_path": "shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm",
      "new_id": "93579f5396d196d22e0947f36225a76f4edcfa87",
      "new_mode": 33188,
      "new_path": "shell/platform/darwin/macos/framework/Source/FlutterViewControllerTest.mm"
    }
  ]
}
