Skip to content

Commit

Permalink
Mark ReastaurationManager not disposed (#134832)
Browse files Browse the repository at this point in the history
  • Loading branch information
derdilla authored Sep 20, 2023
1 parent 237db2b commit a0406cc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/flutter/test/services/restoration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ void main() {
});

group('RestorationManager', () {
testWidgets('root bucket retrieval', (WidgetTester tester) async {
testWidgetsWithLeakTracking('root bucket retrieval', (WidgetTester tester) async {
final List<MethodCall> callsToEngine = <MethodCall>[];
final Completer<Map<dynamic, dynamic>> result = Completer<Map<dynamic, dynamic>>();
tester.binding.defaultBinaryMessenger.setMockMethodCallHandler(SystemChannels.restoration, (MethodCall call) {
Expand Down Expand Up @@ -62,7 +62,11 @@ void main() {
});
expect(synchronousBucket, isNotNull);
expect(synchronousBucket, same(rootBucket));
});
},
// TODO(NobodyForNothing): Remove after fixing and cover remaining file
// with leak tests https://github.com/flutter/flutter/issues/134831
leakTrackingTestConfig: const LeakTrackingTestConfig(notDisposedAllowList:
<String, int?>{'RestorationManager': 1}));

testWidgets('root bucket received from engine before retrieval', (WidgetTester tester) async {
SystemChannels.restoration.setMethodCallHandler(null);
Expand Down

0 comments on commit a0406cc

Please sign in to comment.