Skip to content

Commit

Permalink
Ignore app.stop events received before the app.detach response in att…
Browse files Browse the repository at this point in the history
…ach integration tests (#128593)

The app.detach command will close the VM service connection, which yields an app.stop event in the daemon protocol.  The daemon does not guarantee any ordering between this event and the response to the app.detach.

See flutter/flutter#128546
  • Loading branch information
jason-simmons authored Jun 9, 2023
1 parent 5047690 commit a08a211
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ class FlutterRunTestDriver extends FlutterTestDriver {
// to throw if it sees an app.stop event before the response to this request.
final Future<Map<String, Object?>> responseFuture = _waitFor(
id: requestId,
ignoreAppStopEvent: method == 'app.stop',
ignoreAppStopEvent: method == 'app.stop' || method == 'app.detach',
);
_process?.stdin.writeln(jsonEncoded);
final Map<String, Object?> response = await responseFuture;
Expand Down

0 comments on commit a08a211

Please sign in to comment.