Skip to content

test(dart): stub the Flutter device probes in the default-io factory case (#1101) - #1104

Open
debugmcpdev wants to merge 1 commit into
mainfrom
test/1101-dart-default-io-probes
Open

debugmcpdev wants to merge 1 commit into
mainfrom
test/1101-dart-default-io-probes

Conversation

@debugmcpdev

Copy link
Copy Markdown
Collaborator

Closes #1101.

packages/adapter-dart/tests/unit/dart-adapter-factory.default-io.test.ts, case "finds a DART_SDK on disk through the real file system": it runs the real locator on purpose and stubbed probeDartVersion and probeFlutterVersion ("they would spawn the SDK"), but not probeFlutterDevices or probeFlutterEmulators. Deleting FLUTTER_ROOT does not hide a Flutter the locator finds through which or a known install directory, so on a machine with Flutter installed describeToolchain ran a real flutter devices --machine and flutter emulators with the default budget — a cold Flutter tool start plus device discovery, seconds past the case budget. Seen by a contributor on macOS arm64 while running the unit suite for #1099, identical on main; CI never saw it because its runners have no Flutter.

Two stub lines (async () => null for both device probes) and the header sentence now says all four probes are stubbed and why. The case keeps what it is for: the real file system and which under an explicit DART_SDK.

Test-only, no behaviour change: no-changelog.

🤖 Generated with Claude Code

…case (#1101)

The "finds a DART_SDK on disk" case runs the real locator on purpose and
stubbed probeDartVersion and probeFlutterVersion because they would spawn
the SDK — but not probeFlutterDevices or probeFlutterEmulators. Deleting
FLUTTER_ROOT does not hide a Flutter the locator finds through `which`
or a known install dir, so on a developer machine with Flutter installed
describeToolchain ran a real `flutter devices --machine` and `flutter
emulators` with the default budget: a cold Flutter tool start plus device
discovery, seconds past the case's budget (seen by a contributor on macOS
arm64 while running the unit suite for #1099, identical on main). CI
never saw it because its runners have no Flutter.

All four probes are stubbed now; the case keeps what it is for — the
real file system and `which` under an explicit DART_SDK.

Closes #1101.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@debugmcpdev debugmcpdev added the no-changelog PR needs no CHANGELOG fragment (refactor, CI-internal, or otherwise not user-visible) label Nov 7, 2026
@codecov

codecov Bot commented Nov 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog PR needs no CHANGELOG fragment (refactor, CI-internal, or otherwise not user-visible)

Projects

None yet

2 participants