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

[ci] Take screenshot when native drive test is taking longer than 10 minutes #8050

Merged
merged 6 commits into from
Nov 18, 2024

Conversation

jmagman
Copy link
Member

@jmagman jmagman commented Nov 9, 2024

If the flutter test run takes more than 10 minutes (default timeout is 12 minutes) take a screenshot and attach to the logs directory.

Helped debug flutter/flutter#153578 (comment).

Probably flutter test should have a screenshot option similar to flutter drive, but at the moment it doesn't.

Pre-launch Checklist

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

@jmagman jmagman self-assigned this Nov 9, 2024
@jmagman jmagman marked this pull request as ready for review November 12, 2024 00:26
Copy link
Contributor

@stuartmorgan stuartmorgan left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -445,17 +446,35 @@ class DriveExamplesCommand extends PackageLoopingCommand {

bool passed = true;
for (final String target in individualRunTargets) {
final int exitCode = await processRunner.runAndStream(
final Timer timeoutTimer = Timer(const Duration(minutes: 10), () async {
printError('Test is taking a long time, taking screenshot...');
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe printWarning?

@jmagman jmagman added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 18, 2024
@auto-submit auto-submit bot merged commit fc4adc7 into flutter:main Nov 18, 2024
77 checks passed
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 18, 2024
sinyu1012 added a commit to sinyu1012/packages that referenced this pull request Nov 19, 2024
* main:
  [ci] Take screenshot when native drive test is taking longer than 10 minutes (flutter#8050)
  Applied Gradle Plugins Declaratively for Most Remaining Plugin Example Apps (Part 3) (flutter#8037)
  [pigeon]: Bump org.jetbrains.kotlin:kotlin-bom from 1.8.10 to 2.0.21 in /packages/pigeon/platform_tests/test_plugin/android (flutter#7867)
  [gradle]: Bump androidx.test.ext:junit-ktx from 1.1.5 to 1.2.1 in /packages/shared_preferences/shared_preferences_android/android (flutter#8097)
  [pigeon]: Bump org.jetbrains.kotlin:kotlin-gradle-plugin from 2.0.20 to 2.0.21 in /packages/pigeon/platform_tests/test_plugin/android (flutter#7869)
  [gradle]: Bump org.hamcrest:hamcrest from 2.2 to 3.0 in /packages/espresso/android (flutter#8092)
  [pigeon]: Bump io.mockk:mockk from 1.13.12 to 1.13.13 in /packages/pigeon/platform_tests/test_plugin/android (flutter#7868)
  [shared_pref]: Bump io.mockk:mockk from 1.13.12 to 1.13.13 in /packages/shared_preferences/shared_preferences_android/android (flutter#7866)
  Add autosubmit label to dependabot PRs (flutter#8101)
  Roll Flutter from 0e2d55e0e7b2 to b3818f6b5979 (23 revisions) (flutter#8118)
  [gradle]: Bump org.mockito.kotlin:mockito-kotlin from 4.1.0 to 5.4.0 in /packages/interactive_media_ads/android (flutter#8095)
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.

2 participants