-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
a: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsc: flakeTests that sometimes, but not always, incorrectly passTests that sometimes, but not always, incorrectly pass
Description
#16857 introduced a bunch of tests of the new versioning functionality, which is great. Unfortunately, the tests aren't hermetic - they're accessing the real file system and spawning processes against the real OS. That makes them subject to significantly more flakiness.
We should move these to be hermetic (using the mock process manager and memory file system, etc.). For example, the other tests in xcodeproj_test.dart use testUsingOsxContext(), which sets up all the hermetic bindings:
flutter/packages/flutter_tools/test/ios/xcodeproj_test.dart
Lines 40 to 44 in bf531ba
| testUsingContext(description, testMethod, overrides: <Type, Generator>{ | |
| ProcessManager: () => mockProcessManager, | |
| Platform: () => macOS, | |
| FileSystem: () => fs, | |
| }); |
ralph-bergmann
Metadata
Metadata
Assignees
Labels
a: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsc: flakeTests that sometimes, but not always, incorrectly passTests that sometimes, but not always, incorrectly pass