From a08a2110400721d00e82068c918b412045cda7e8 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Fri, 9 Jun 2023 10:50:03 -0700 Subject: [PATCH] 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 --- packages/flutter_tools/test/integration.shard/test_driver.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter_tools/test/integration.shard/test_driver.dart b/packages/flutter_tools/test/integration.shard/test_driver.dart index 22eac01355..24a8e59575 100644 --- a/packages/flutter_tools/test/integration.shard/test_driver.dart +++ b/packages/flutter_tools/test/integration.shard/test_driver.dart @@ -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> responseFuture = _waitFor( id: requestId, - ignoreAppStopEvent: method == 'app.stop', + ignoreAppStopEvent: method == 'app.stop' || method == 'app.detach', ); _process?.stdin.writeln(jsonEncoded); final Map response = await responseFuture;