From 14626c0a6d44a273da8038ad2677a43313ff3b9c Mon Sep 17 00:00:00 2001 From: Danny Tuppeny Date: Tue, 2 Aug 2022 21:44:06 +0100 Subject: [PATCH] [flutter_tools] Test that DAP process terminates at the end of a session (#108301) --- .../debug_adapter/flutter_adapter_test.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/flutter_tools/test/integration.shard/debug_adapter/flutter_adapter_test.dart b/packages/flutter_tools/test/integration.shard/debug_adapter/flutter_adapter_test.dart index 6cb284cfb0..7074760254 100644 --- a/packages/flutter_tools/test/integration.shard/debug_adapter/flutter_adapter_test.dart +++ b/packages/flutter_tools/test/integration.shard/debug_adapter/flutter_adapter_test.dart @@ -99,6 +99,13 @@ void main() { '', startsWith('Exited'), ]); + + // If we're running with an out-of-process debug adapter, ensure that its + // own process shuts down after we terminated. + final DapTestServer server = dap.server; + if (server is OutOfProcessDapTestServer) { + await server.exitCode; + } }); testWithoutContext('outputs useful message on invalid DAP protocol messages', () async {