Skip to content

chore: remove the slow flaky e2e/patrol suite - #1098

Merged
Lyokone merged 1 commit into
masterfrom
chore/drop-e2e-patrol-suite
Jul 22, 2026
Merged

chore: remove the slow flaky e2e/patrol suite#1098
Lyokone merged 1 commit into
masterfrom
chore/drop-e2e-patrol-suite

Conversation

@Lyokone

@Lyokone Lyokone commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Why

The GPS-mocked e2e suite (patrol + a fake GeoClue2 D-Bus service) is slow and almost never green. In the workflow, iOS, Web, macOS and Windows were all already continue-on-error, and the only remaining blocking mobile job — Android — flaked on Patrol's native permission dialog (grantPermissionWhenInUse() ... 404). A suite that's mostly red and ignored gives no trustworthy signal while costing CI minutes and a lot of maintenance. Replace it with what already works: the fast, deterministic mockito unit tests plus the location prepare build/analyze jobs.

Bonus: patrol was the single root cause of most of the recent pain — the macOS build failure (could not build module 'patrol'), the iOS runner-target gap, the web flake, the Android native-permission flake, and the Java 8 obsolete options warnings. Removing it clears all of them.

Changes

  • Delete .github/workflows/e2e.yaml and .github/scripts/fake_geoclue2.py.
  • Delete packages/location/example/integration_test/ and the Patrol Android test runner (androidTest/MainActivityTest.java).
  • Remove patrol (and the now-unused integration_test) from the example dev_dependencies, plus its PatrolJUnitRunner / orchestrator wiring in android/app/build.gradle.
  • patrol was the sole reason prepare-macos was continue-on-error; it's now a normal blocking job, so location prepare can go fully green.

Coverage after this

  • Kept & passing: packages/location/test (11 tests), packages/location_platform_interface/test (37 tests) — the Dart facade and the MethodChannel contract.
  • Still enforced per-PR by location prepare: flutter analyze, dart format, unit tests, and flutter build apk/ios/macos — so native compile breaks are still caught.
  • Lost (deliberately): native runtime-behaviour e2e — which never ran reliably anyway.

Verification

  • flutter analyze on the example: no issues.
  • Unit tests: location 11/11, location_platform_interface 37/37 green.
  • No patrol references remain in tracked source (lockfile/plugin registrants are gitignored and regenerate on pub get).

The GPS-mocked e2e suite (patrol + a fake GeoClue2 D-Bus service) was slow
and almost never green: iOS, Web, macOS and Windows were all already
continue-on-error, and the one remaining blocking mobile job (Android)
flaked on Patrol's native permission dialog. A suite that's mostly red and
ignored provides no real signal, so drop it in favour of the fast, reliable
mockito unit tests plus the location-prepare build/analyze jobs.

- Delete .github/workflows/e2e.yaml and .github/scripts/fake_geoclue2.py.
- Delete packages/location/example/integration_test/ and the Patrol Android
  test runner (androidTest/MainActivityTest.java).
- Remove patrol (and the now-unused integration_test) from the example's
  dev_dependencies, and its instrumentation-runner / orchestrator wiring
  from android/app/build.gradle.
- patrol was the sole cause of the macOS build failure, so prepare-macos no
  longer needs continue-on-error -- it's now a normal blocking job.

Native code is still compiled on every PR by location-prepare (build apk /
build ios / build macos); only the runtime behaviour checks that never ran
reliably are gone. The Dart layer and MethodChannel contract stay covered by
the unit tests in packages/*/test/.
@Lyokone
Lyokone merged commit 8a7172e into master Jul 22, 2026
6 checks passed
@Lyokone
Lyokone deleted the chore/drop-e2e-patrol-suite branch July 22, 2026 14:51
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.

1 participant