Repository navigation
Description
Looking for volunteers to help with this!
Subtask of: flutter/devtools#3951
Issues: all, open.
PRs: all, open.
All invocations of testWidgets under flutter/test (~ 10,000) should be converted to testWidgetsWithLeakTracking by iterating the steps:
-
Comment on this issue what subset of tests you plan to work on so that we do not duplicate work. Then delete the added comment as soon as you are done or if your plans changed. If all tests seems to be occupied, let me know, and I will redistribute them.
-
Convert set of
testWidgets, create PR and, if tests pass, request review and merge. Example: Cover more tests with leak tracking. flutter/flutter#132806 -
For tests that fail, investigate them and search for the culprit class name in onen issues or PRs (check links above). If the issue for this concrete leak is already created or PR is on the way, leave this test to be 'testWidgets'. Otherwise, move the conversion to a separate PR, and do one of two in this PR:
a. Fix the failure if it is strait-forward.
b. Create issue that explains the leak, create allowlist, and link the issue near the allowlist. Example: Mark leak in text_form_field_test.dart. flutter/flutter#130468. Then either allow triage process to happen or assign the issue to yourself and resolve it in a separate PR.
-
Link the issue and the fix in a comment for this PR.
-
Do not:
- Instrument new disposables, because we want to clean up leaks first for already instrumented ones
- Convert many tests with the same issue linked to allowlists. One test is enough to repro the issue.
Focus areas:
@ksokolovskyi: test/widgets
@droidbg: test/paintings, test/rendering and test/gestures
@NobodyForNothing: paused (thank you for what is done and in process)
@polina-c: coordinating complicated cases and integration with testWidgets
Discord calls: 1, 2
Thread on discord for leak_tracker updates
Activity
polina-c commentedon Aug 28, 2023
flutter/test:
Non trivial open issues/PRs:
polina-c commentedon Aug 29, 2023
progress check: 2071 tests are converted
navaronbracke commentedon Aug 31, 2023
@polina-c Where do we track that all required widgets/services do
in their constructor?
polina-c commentedon Aug 31, 2023
Yes, not all extenders of ChangeNotifier do this at the moment.
For now it is added as needed, so no tracking yet. I have two PRs for this waiting lgtm:
flutter/flutter#133716
flutter/flutter#133717
Feel free to just add it where you need.
ksokolovskyi commentedon Aug 31, 2023
@polina-c Could you please take a look at this PR, which adds tracking to the ScrollController: flutter/flutter#133759 ?
polina-c commentedon Sep 5, 2023
progress check: 3458 tests covered
polina-c commentedon Sep 9, 2023
@ksokolovskyi , I updated description asking to communicate subset of tests where you plan to work.
ksokolovskyi commentedon Sep 9, 2023
@polina-c, nice, thanks.
If you don't mind, I would like to continue with test/widgets.
polina-c commentedon Sep 14, 2023
progress check: 5223 tests are converted
derdilla commentedon Sep 15, 2023
working on test/semantics and test/scheduler and test/cupertinoI'm currently not actively working on this, but some PRs are still open.
polina-c commentedon Sep 19, 2023
Progress check: 6202 tests are converted.
polina-c commentedon Sep 21, 2023
Labelled issues and PRs with "a: leak tracking" and linked in description.
1 remaining item
droidbg commentedon Oct 8, 2023
@polina-c I also like to contribute to this.
Can I start with test/paintings and test/gestures, if it is not taken by anyone?
polina-c commentedon Oct 8, 2023
@droidbg, yes and thank you!
Added test/paintings and test/gestures to the focus areas in description.
And, please, take into account this issue and related PRs working with gestures: flutter/flutter#136132
polina-c commentedon Oct 8, 2023
covered: 8826
remaining: 1036
droidbg commentedon Oct 9, 2023
@polina-c I have raised PRs for test/gesture and test/painting, could you please review it.
Also, test/gesture is done and test/painting is almost done, so I will be picking test/rendering in parallel now.
[-]Clean up notDisposed leaks in Flutter Framework.[/-][+]Clean up notDisposed leaks in Flutter Framework, phase 1.[/+]droidbg commentedon Oct 11, 2023
@polina-c I have raised PRs for test/rendering (all TCs are done), could you please review it.
Also, can I pick test/cupertino now if no one is working on it now?
derdilla commentedon Oct 11, 2023
@droidbg I used to work on test/cupertino feel free to continue it. Here are some notes about the unconverted tests I still have:
A PR for cupertino/date_picker_test is still open.
The following files are not converted and have undisposed widgets:
Once flutter/flutter#134661 is completed, you should be able to cover
cupertino/nav_bar_testandcupertino/scaffold_test.I don't know about any other unconverted tests but you should probably check for yourself in case I missed something.
polina-c commentedon Oct 12, 2023
Will appreciate votes here: flutter/devtools#6266 (comment)
@NobodyForNothing @ksokolovskyi @droidbg @navaronbracke
polina-c commentedon Oct 12, 2023
FYI, update on leak_tracker progress: https://discord.com/channels/608014603317936148/1106667330093723668/1162097704462196788
droidbg commentedon Oct 21, 2023
Hello folks, these are the updates on the subsets I was working on:
@polina-c
Can I pick up test/material, if no one is working on it?
or if there is anything else that I can help with, do let me know. Thanks.
ksokolovskyi commentedon Oct 21, 2023
Hi @droidbg, thanks for your work!
Currently, I'm responsible for material and widgets tests.
All material tests will be covered after #137004 merge.
@polina-c, do you have any tasks for @droidbg?
polina-c commentedon Oct 26, 2023
98% are covered!!!
@ksokolovskyi, @droidbg , @NobodyForNothing , I greatly appreciate your help!
Closing this issue in favor of the next phase, where help is also needed and appreciated: flutter/flutter#137311
polina-c commentedon Oct 26, 2023
Yes, pick any class or test-set in flutter/flutter#137311