flutter/packages/flutter_tools/test/commands.shard
Nils Reichardt 70cd54c3fd
Add --ignore-timeouts flag for flutter test command (#164437)
As in #105913 described, running integration tests of your app often
times out. The issue for this is that the `test` package has their own
timeout for loading the test suite:


db8cf09150/pkgs/test_core/lib/src/runner/load_suite.dart (L23-L29)

This timeout is not configurable. However, you can bypass this timeout
using `--ignore-timeouts` when running `dart test`. This PR adds the
`--ignore-timeouts` flag to the `flutter test` command and passes it to
the `test` package.

Adding the flag would be the easiest fix for #105913. I will later add
documentation to the integration test docs, that passing this flag will
fix the timeout issue. Otherwise, we would need to make the load test
suite timeout configurable in the `test` package and then somehow set it
in the `flutter test` command.

Fixes #105913

![Screenshot 2025-03-02 at 00 08
59](https://github.com/user-attachments/assets/af84efe3-2174-4531-919f-bffdf1500430)

A screenshot of running `flutter test integration_test
--ignore-timeouts` which surpasses the previous timeout of 12 minutes.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-04-01 14:17:20 +00:00
..
hermetic Add --ignore-timeouts flag for flutter test command (#164437) 2025-04-01 14:17:20 +00:00
permeable [ Widget Preview ] Display an error widget when an exception is thrown while defining the widget tree (#166005) 2025-03-27 18:47:51 +00:00
README.md

This directory contains tests for specific flutter commands.

Tests that are self-contained unit tests should go in hermetic/.

Tests that are more end-to-end, e.g. that involve actually running subprocesses, should go in permeable/.

The ../../tool/coverage_tool.dart script (which is used to collect coverage for the tool) runs only the tests in the hermetic directory when collecting coverage.