You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
[macOS] Clean up resources in ViewController tests
Wraps all FlutterViewController tests in an autorelease pool to ensure
resources are cleaned up.
Adds a MockFlutterEngineTest subclass of AutoreleasePoolTest that
creates an OCPartialMock FlutterEngine and shuts it down at the end of
the test. Previously we were not shutting down any FlutterEngine
instances we allocated, resulting in potentially thousands of threads
and graphics contexts being allocated.
Prior to this change, running these tests via:
../out/host_debug_unopt_arm64/flutter_desktop_darwin_unittests \
--gtest_filter='FlutterViewController.*' --gtest_repeat=1000
resulted in test failures and sometimes segfaults. This ensures
resources are cleaned up
Eventually all unit tests should configure their FlutterEngine via
either FlutterEngineTest (which should be an AutoreleasePoolTest) or
MockFlutterEngineTest, and the CreateMockFlutterEngine function moved to
a static used in the implementation of these.
Issue: flutter/flutter#104789
Issue: flutter/flutter#127441
Issue: flutter/flutter#124840
0 commit comments