Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create adjustable test settings. #152

Merged
merged 64 commits into from
Oct 21, 2023
Merged

Conversation

polina-c
Copy link
Contributor

@polina-c polina-c commented Oct 10, 2023

Contributes to flutter/flutter#135856

Draft of PR for Flutter to consume the changes: flutter/flutter#136692.

After merging this PR, I will update flutter/test, to have 8% of tests that are not leak free yet looking like this:

    testWidgets('initialTimerDuration falls within limit',
    experimentalLeakTracking: LeakTrackingForTests.ignored(),
    (WidgetTester tester) async {
        ...

@polina-c polina-c requested a review from CoderDake as a code owner October 10, 2023 16:04
@polina-c polina-c marked this pull request as draft October 10, 2023 16:04
@polina-c polina-c marked this pull request as ready for review October 13, 2023 02:23
Copy link

@kenzieschmoll kenzieschmoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments around naming that might make these classes / method names more intuitive.

pkgs/leak_tracker/CHANGELOG.md Outdated Show resolved Hide resolved
void _emptyLeakHandler(Leaks leaks) {}

/// Leak tracking settings and helper methods for tests.
abstract class LeakTrackingForTests {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels like LeakTrackingForTestsSettings and LeakTrackingForTests should just be one class then? Why do the statics need to be separated out?

@polina-c polina-c requested a review from goderbauer October 20, 2023 23:02
Copy link

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@polina-c polina-c merged commit 1f2264e into dart-lang:main Oct 21, 2023
2 checks passed
@polina-c polina-c deleted the test-settings branch October 21, 2023 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants