Skip to content

doctor_test.dart uses GroupedValidator in tests which reports real execution times #161918

Closed

Description

@bkonyi

This can result in flakiness when running on slower machines like our test infrastructure.

Example failure from logs:

06:22 +308 ~2: test/commands.shard/hermetic/doctor_test.dart: doctor with grouped validators validate merging assigns statusInfo and title
Expected: '[✓] First validator title (A status message) [0ms]\n'
            '    • A helpful message\n'
            '    • A different message\n'
            '\n'
            '• No issues found!\n'
            ''
  Actual: '[✓] First validator title (A status message) [1ms]\n'
            '    • A helpful message\n'
            '    • A different message\n'
            '\n'
            '• No issues found!\n'
            ''
   Which: is different.
          Expected: ... message) [0ms]\n     ...
            Actual: ... message) [1ms]\n     ...
                                  ^
           Differ at offset 46

#0      fail (package:matcher/src/expect/expect.dart:149:31)
#1      _expect (package:matcher/src/expect/expect.dart:144:3)
#2      expect (package:matcher/src/expect/expect.dart:56:3)
#3      main.<anonymous closure>.<anonymous closure> (file:///Volumes/Work/s/w/ir/x/w/flutter/packages/flutter_tools/test/commands.shard/hermetic/doctor_test.dart:710:7)
<asynchronous suspension>
#4      testUsingContext.<anonymous closure>.<anonymous closure>.<anonymous closure>.<anonymous closure>.<anonymous closure> (file:///Volumes/Work/s/w/ir/x/w/flutter/packages/flutter_tools/test/src/context.dart:151:32)
<asynchronous suspension>
#5      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
<asynchronous suspension>
#6      testUsingContext.<anonymous closure>.<anonymous closure>.<anonymous closure>.<anonymous closure> (file:///Volumes/Work/s/w/ir/x/w/flutter/packages/flutter_tools/test/src/context.dart:140:28)
<asynchronous suspension>

Activity

  1. added
    P1High-priority issues at the top of the work list
    toolAffects the "flutter" command-line tool. See also t: labels.
    triaged-toolTriaged by Flutter Tool team
    on Jan 20, 2025
  2. self-assigned this
    on Jan 20, 2025
  3. flutter-triage-bot commented on Jan 20, 2025

    @flutter-triage-bot

    The triaged-tool label is irrelevant if there is no team-tool label or fyi-tool label.

  4. github-actions commented on Feb 3, 2025

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  5. locked as resolved and limited conversation to collaborators on Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listtoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions