From d6593dee96da3477a50eeb62f1de271efb276b05 Mon Sep 17 00:00:00 2001 From: Victoria Ashworth Date: Tue, 4 Apr 2023 14:36:39 -0500 Subject: [PATCH] Make flutter_adapter_test more resilient to pub output (#124139) Make flutter_adapter_test more resilient to pub output --- .../debug_adapter/flutter_adapter_test.dart | 38 ++++++++++++------- 1 file changed, 24 insertions(+), 14 deletions(-) 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 ebcc397b921..a09af553153 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 @@ -60,14 +60,18 @@ void main() { final String output = _uniqueOutputLines(outputEvents); - expectLines(output, [ + expectLines( + output, + [ 'Launching $relativeMainPath on Flutter test device in debug mode...', - startsWith('Connecting to VM Service at'), - 'topLevelFunction', - 'Application finished.', - '', - startsWith('Exited'), - ]); + startsWith('Connecting to VM Service at'), + 'topLevelFunction', + 'Application finished.', + '', + startsWith('Exited'), + ], + allowExtras: true, + ); }); testWithoutContext('logs to client when sendLogsToClient=true', () async { @@ -125,13 +129,17 @@ void main() { final String output = _uniqueOutputLines(outputEvents); - expectLines(output, [ - 'Launching $relativeMainPath on Flutter test device in debug mode...', - 'topLevelFunction', - 'Application finished.', - '', - startsWith('Exited'), - ]); + expectLines( + output, + [ + 'Launching $relativeMainPath on Flutter test device in debug mode...', + 'topLevelFunction', + 'Application finished.', + '', + startsWith('Exited'), + ], + allowExtras: true, + ); // If we're running with an out-of-process debug adapter, ensure that its // own process shuts down after we terminated. @@ -246,6 +254,7 @@ void main() { startsWith('Reloaded'), 'topLevelFunction', ], + allowExtras: true, ); await dap.client.terminate(); @@ -320,6 +329,7 @@ void main() { startsWith('Restarted application'), 'topLevelFunction', ], + allowExtras: true, ); await dap.client.terminate();