Skip to content

[flutter_tools] general.shard and commands.shard/hermetic are not hermetic #107607

Description

@christopherfujino

The flutter_tools test suite should pass on local development devices. However, running dart test in //flutter/packages/flutter_tools will generally lead to hundreds of failures. Especially the unit test in the general.shard and commands.shard/hermetic should be hermetic and not dependent on the environment that they are run in. These tests that pass on CI but fail locally are most likely leaking the environment state, and only coincidentally pass on CI because the environment state is correct. These tests should be updated to fake out the real environment so that the tests are reproducible locally (integration tests will always have dependencies on the system they run on).

This is an umbrella tracking issue for PRs that fix individual tests.

As part of this, we should also remove all instances of @Tags(<string>['no-shuffle']) from the test suite (see #85160)

edits by @andrewkolos:

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Jul 14, 2022
  2. added
    P2Important issues not at the top of the work list
    on Jul 14, 2022
  3. changed the title [-][flutter_tools] tools tests should pass locally[/-] [+][flutter_tools] general.shard and commands.shard/hermetic are not hermetic[/+] on Jul 14, 2022
  4. christopherfujino commented on Nov 2, 2022

    @christopherfujino
    ContributorAuthor

    We should periodically see if any testUsingContext tests can be migrated to testWithoutContext. One way to do this would be to leverage the dart fix feature to auto-migrate all testUsingContext invocations to testWithoutContext and then see which tests don't start failing.

  5. self-assigned this
    on Jul 10, 2024
  6. removed their assignment
    on Oct 7, 2024
  7. added
    tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.
    on Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions