Repository navigation
test: add timeouts to patrol event waits - #793
Merged
Merged
Conversation
1 of 6 tasks
jokerttu
marked this pull request as ready for review
November 5, 2026 07:16
jokerttu
force-pushed
the
patrol-event-timeouts
branch
from
November 5, 2026 11:55
d97e594 to
30abfa8
Compare
jokerttu
force-pushed
the
patrol-event-timeouts
branch
from
November 5, 2026 12:12
30abfa8 to
1d282b3
Compare
illuminati1911
approved these changes
Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bounds every event wait in the Patrol tests so a missing event fails fast with its name, instead of blocking until the 8-minute test timeout.
shared.dartaddswithEventTimeoutonFuture, witheventTimeout(30 s) for events that follow promptly from an action andarrivalTimeout(60 s) for arriving at a simulated destination.startNavigationWithoutDestinationuses the existingControllerCompleter, which already times out.t06waits for the map click with a 10 s timeout instead ofexpectAsync1, and still fails if one tap produces several clicks.t07dropsexpectAsyncwrappers that only added an unbounded "called at least once" wait; each listener already completes aneventReceivedcompleter, which is now awaited with a timeout.t03andt05bound their arrival and camera-event waits.Before this change,
Test map UI settingshung for the full 8 minutes on iOS when the map click never arrived. It now fails after 10 seconds with "Map click event was not received within 10 seconds."Stacked on #792.
Checks run
flutter analyze --fatal-infosonexample/patrol_testwith Flutter 3.44.9 (CI's 3.44.x).t0312/13,t053/3,t0610/12,t077/7.t03failure is thesetDestinationsvariant of the multiple-destinations test, which also fails on feat!: upgrade Android Navigation SDK to 8.0.0 #784's CI run, before the iOS upgrade. It now fails after about a minute instead of hanging.t06failures are bothTest map UI settingsvariants: the map click is not delivered on this machine (Flutter 3.50 beta, Xcode 27). They fail the same way on iOS Navigation SDK 11.1.0 and pass in feat!: upgrade Android Navigation SDK to 8.0.0 #784's CI run.t03tests passed with this change before the emulator restarted for host-memory reasons.t05,t06andt07have not run on Android with this change yet; they will run in the full pass on the top of the stack.Map click on Android. On a busy emulator, Patrol's
tapAtcan reach the map as a long press. The plugin then sendsonMapLongClicked, soonMapClickednever fires. The test used to log the long click as "Map clicked event", which hid this. It now labels it as a long click, and a long click that arrives while the test waits for the click fails right away with "The tap was delivered as a long click, not a click." The test still requiresonMapClicked.Pre-launch Checklist