Skip to content

Conversation

@matanlurey
Copy link
Contributor

@matanlurey matanlurey commented Nov 18, 2024

Towards #51421.

Asserts some state we would not like to be hit by in integration tests using Flutter*TestDriver.

In addition, adds a tag that can be used to run all tests that currently use this pattern:

flutter test --tags flutter-test-driver

This showcases processes leaking quite a bit: https://gist.github.com/matanlurey/190d9084d3a45bc5737b8406bc05b4cd.

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Nov 18, 2024
@matanlurey matanlurey marked this pull request as ready for review November 18, 2024 20:55
Copy link
Member

@zanderso zanderso left a comment

Choose a reason for hiding this comment

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

lgtm but consider adding an explicit delay between sending SIGKILL and testing _hasExited.

if (result != 0) {
_debugPrint('Expected process to terminate gracefully, got exit code $result.');
}
if (!_hasExited) {
Copy link
Member

Choose a reason for hiding this comment

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

My guess is that this could be flakey since it looks like there's potentially no delay between sending SIGKILL for the _killForcefully case, and doing this test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah I see _killForcefully returns _process!.exitCode, which in turn means it must to have exited - but we could get unlucky on the microtask queue. Will add an event loop delay and a comment, thanks for the callout.

@matanlurey matanlurey added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 18, 2024
Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

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

LGTM stamp from a Japanese personal seal

@auto-submit auto-submit bot added this pull request to the merge queue Nov 18, 2024
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 18, 2024
Merged via the queue into flutter:master with commit 3a17b67 Nov 18, 2024
145 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 19, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 19, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 19, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 19, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Nov 19, 2024
flutter/flutter@b3818f6...8536b96

2024-11-19 [email protected] Terminate `flutter test` when no longer needed in integration test. (flutter/flutter#159117)
2024-11-19 [email protected] Terminate the test device if the `flutter` tool is signal-killed. (flutter/flutter#159115)
2024-11-19 [email protected] Roll Packages from c1eabf5 to fc4adc7 (10 revisions) (flutter/flutter#159143)
2024-11-19 [email protected] Deflake api 35 emulator tests by updating emulator definitions version to latest available from chrome infra (flutter/flutter#158017)
2024-11-19 [email protected] Roll Flutter Engine from b6723e33b858 to cff1e751f853 (1 revision) (flutter/flutter#159141)
2024-11-19 [email protected] Fix InkWell overlayColor resolution ignores selected state (flutter/flutter#159072)
2024-11-19 [email protected] Roll Flutter Engine from 983b7b85d122 to b6723e33b858 (3 revisions) (flutter/flutter#159134)
2024-11-19 [email protected] Roll Flutter Engine from c1b0e18a70b3 to 983b7b85d122 (2 revisions) (flutter/flutter#159124)
2024-11-19 [email protected] Roll Flutter Engine from 878f593802e1 to c1b0e18a70b3 (13 revisions) (flutter/flutter#159118)
2024-11-19 [email protected] [SwiftPM] Move where the migration checks feature flags (flutter/flutter#159110)
2024-11-18 [email protected] Plumbs `scrollBehavior` into `SelectableText` so that the scrollbar may be hidden (flutter/flutter#158887)
2024-11-18 [email protected] Add a tag and assert some state in FlutterTestDriver tests. (flutter/flutter#159099)
2024-11-18 49699333+dependabot[bot]@users.noreply.github.com Bump codecov/codecov-action from 4.6.0 to 5.0.2 in the all-github-actions group (flutter/flutter#159104)
2024-11-18 [email protected] Add `@protected` to public `State` method overrides (flutter/flutter#157313)
2024-11-18 [email protected] Roll Flutter Engine from 9686de154114 to 878f593802e1 (5 revisions) (flutter/flutter#159097)
2024-11-18 [email protected] Fix flaky failure related to core_device_list.json not being found (flutter/flutter#158946)
2024-11-18 [email protected] Prettier merge_queue.md (flutter/flutter#158969)
2024-11-18 [email protected] Define and use `flutterBin` consistently across `integration.shard`. (flutter/flutter#159007)
2024-11-18 [email protected] No longer download `android-x86-jit-release`. (flutter/flutter#159011)
2024-11-18 [email protected] Roll Flutter Engine from e1f4e7d9bfc4 to 9686de154114 (1 revision) (flutter/flutter#159082)
2024-11-18 [email protected] Roll Flutter Engine from f365c9f5dce3 to e1f4e7d9bfc4 (4 revisions) (flutter/flutter#159078)
2024-11-18 [email protected] Roll Packages from b164be3 to c1eabf5 (6 revisions) (flutter/flutter#159077)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@reidbaker reidbaker mentioned this pull request Dec 13, 2024
11 tasks
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 12, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 7, 2025
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.

3 participants