From 1f1eec06f1b011078de99d8eeca490b4a41a657e Mon Sep 17 00:00:00 2001 From: Polina Cherkasova Date: Wed, 6 Nov 2024 16:23:04 -0800 Subject: [PATCH] Make leak tracking bots blocking. (#157866) See http://flutter.dev/go/leak-tracker-make-bots-blocking --- .ci.yaml | 4 ---- docs/contributing/testing/Leak-tracking.md | 20 ++++++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.ci.yaml b/.ci.yaml index dae5367a36..d44bd12b28 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -5625,10 +5625,8 @@ targets: - name: Windows framework_tests_libraries_leak_tracking recipe: flutter/flutter_drone - bringup: true # New target: https://github.com/flutter/flutter/issues/140414 timeout: 120 properties: - ignore_flakiness: "true" test_timeout_secs: "3600" # 1 hour dependencies: >- [ @@ -5712,10 +5710,8 @@ targets: - name: Windows framework_tests_widgets_leak_tracking recipe: flutter/flutter_drone - bringup: true # New target: https://github.com/flutter/flutter/issues/140414 timeout: 120 properties: - ignore_flakiness: "true" test_timeout_secs: "3600" # 1 hour dependencies: >- [ diff --git a/docs/contributing/testing/Leak-tracking.md b/docs/contributing/testing/Leak-tracking.md index eede05913e..4089f79276 100644 --- a/docs/contributing/testing/Leak-tracking.md +++ b/docs/contributing/testing/Leak-tracking.md @@ -1,13 +1,19 @@ -# Leak tracking in Flutter framework +# Leak tracking in Flutter Framework -Flutter Framework widget tests use [leak_tracker](https://github.com/dart-lang/leak_tracker/blob/main/doc/leak_tracking/ -OVERVIEW.md) to detect leaks from objects that have not been disposed. +## TL;DR; -This page contains Flutter Framework related information. +To enable leak tracking locally pass `--dart-define LEAK_TRACKING=true` to `flutter test`. See leak_tracker documentation for [general leak troubleshooting](https://github.com/dart-lang/leak_tracker/blob/main/doc/leak_tracking/TROUBLESHOOT.md). +This page contains Flutter Framework specific information. + +## Overview + +Flutter Framework widget tests use [leak_tracker](https://github.com/dart-lang/leak_tracker/blob/main/doc/leak_tracking/ +OVERVIEW.md) to detect leaks from objects that have not been disposed. + Test failures cause by leaks look like this: ``` @@ -32,8 +38,8 @@ disposables are disposed. If a tests is opted out, the reasons should be clearly explained in the comments. -It is ok to opt out a test when a test -throws an exception and the code did not finalize properly. +It is ok to opt out a test when the test +throws an exception and thus the code did not finalize properly. While some exceptions should be finalized properly and should not result in leaking objects, @@ -59,5 +65,3 @@ For local testing, or for test shards configuration, to enable leak tracking for `--dart-define LEAK_TRACKING=true` to `flutter test`. You can see the bot's status on the [Flutter build dashboard](https://flutter-dashboard.appspot.com/#/build). -The bots are not blocking yet. -See [a proposal to convert them to be blocking](http://flutter.dev/go/leak-tracker-make-bots-blocking).