Ignore app.stop events received before the app.detach response in attach 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 https://github.com/flutter/flutter/issues/128546
This commit is contained in:
Jason Simmons
2023-06-09 10:50:03 -07:00
committed by GitHub
parent 5047690b53
commit a08a211040

View File

@@ -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;