Skip to content

Commit a0406cc

Browse files
authored
Mark ReastaurationManager not disposed (#134832)
1 parent 237db2b commit a0406cc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/flutter/test/services/restoration_test.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ void main() {
1818
});
1919

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

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

0 commit comments

Comments
 (0)