Skip to content

test(dart): the default-io factory case runs the real flutter devices/emulators probes on a machine with Flutter installed (hermeticity, times out on macOS) #1101

Closed

Description

@debugmcpdev

Seen by @gezerui888 on macOS arm64 (Node 22.23.4) while running the full unit suite for #1099: one failure identical on main and their branch, described in the PR body as "the Dart factory's real Flutter discovery probe exceeding its test budget". Nothing in that PR touches Dart.

Where it can come from (read, not reproduced — this box is Windows and the case passes here): 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 stubs probeDartVersion and probeFlutterVersion ("the version probes stay stubbed: they would spawn the SDK"), but not probeFlutterDevices or probeFlutterEmulators. It deletes FLUTTER_ROOT, yet the real locator still finds Flutter through which('flutter') or a known install directory, so describeToolchain runs the real flutter devices --machine and flutter emulators with the default budget. On a developer machine with Flutter installed that is a cold Flutter tool start plus device discovery — seconds, easily past vitest's per-case budget — and on a machine without Flutter it is nothing, which is why CI never sees it.

Fix, two lines: stub the two device probes in that case (probeFlutterDevices: async () => null, probeFlutterEmulators: async () => null), and extend the header sentence to say all four probes are stubbed because every one of them would spawn the SDK. The case keeps what it is for: the real file system and which under an explicit DART_SDK.

@gezerui888, if you still have the output, the case name and the failure text here would confirm this is the one.

Activity

  1. added a commit that references this issue on Nov 7, 2026
    8bf209a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions