diff --git a/packages/flutter_tools/test/integration.shard/observatory_port_test.dart b/packages/flutter_tools/test/integration.shard/observatory_port_test.dart index eb143e2f85b..1ae471f7270 100644 --- a/packages/flutter_tools/test/integration.shard/observatory_port_test.dart +++ b/packages/flutter_tools/test/integration.shard/observatory_port_test.dart @@ -26,7 +26,7 @@ Future waitForVmServiceMessage(Process process, int port) async { .transform(utf8.decoder) .listen((String line) { printOnFailure(line); - if (line.contains('A Dart VM Service on Flutter test device is available at')) { + if (line.contains('The Flutter DevTools debugger and profiler on Flutter test device is available at')) { if (line.contains('http://127.0.0.1:$port')) { completer.complete(); } else { @@ -66,7 +66,9 @@ void main() { 'flutter-tester', ], workingDirectory: tempDir.path); await waitForVmServiceMessage(process, port); - process.kill(); + // Send a quit command to flutter_tools to cleanly shut down the tool + // and its child processes. + process.stdin.writeln('q'); await process.exitCode; }); @@ -88,7 +90,7 @@ void main() { 'flutter-tester', ], workingDirectory: tempDir.path); await waitForVmServiceMessage(process, ddsPort); - process.kill(); + process.stdin.writeln('q'); await process.exitCode; }); @@ -105,7 +107,7 @@ void main() { 'flutter-tester', ], workingDirectory: tempDir.path); await waitForVmServiceMessage(process, ddsPort); - process.kill(); + process.stdin.writeln('q'); await process.exitCode; });