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

Add --ignore-timeouts flag for flutter test command #164437

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nilsreichardt
Copy link
Contributor

@nilsreichardt nilsreichardt commented Mar 1, 2025

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:

https://github.com/dart-lang/test/blob/db8cf091506a67eba1e523215e0e49a0db7cd1fd/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

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

Pre-launch Checklist

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

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Mar 1, 2025
Comment on lines +284 to +286
'Ignore all timeouts. Useful when testing a big application '
'that requires a longer time to compile (e.g. running integration '
'tests for a Flutter app).',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not so happy with the helper text, as I assume it's confusing that the timeout help text says 'or as the string "none" to disable the timeout entirely' and a --ignore-timeouts flag, which sounds like the same thing but is not.

@OliverNarramore
Copy link

This would be helpful to us, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integration test TimeoutException after 0:12:00.000000: Test timed out after 12 minutes
2 participants