Skip to content

Commit d6593de

Browse files
authored
Make flutter_adapter_test more resilient to pub output (#124139)
Make flutter_adapter_test more resilient to pub output
1 parent a68b424 commit d6593de

File tree

1 file changed

+24
-14
lines changed

1 file changed

+24
-14
lines changed

packages/flutter_tools/test/integration.shard/debug_adapter/flutter_adapter_test.dart

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,18 @@ void main() {
6060

6161
final String output = _uniqueOutputLines(outputEvents);
6262

63-
expectLines(output, <Object>[
63+
expectLines(
64+
output,
65+
<Object>[
6466
'Launching $relativeMainPath on Flutter test device in debug mode...',
65-
startsWith('Connecting to VM Service at'),
66-
'topLevelFunction',
67-
'Application finished.',
68-
'',
69-
startsWith('Exited'),
70-
]);
67+
startsWith('Connecting to VM Service at'),
68+
'topLevelFunction',
69+
'Application finished.',
70+
'',
71+
startsWith('Exited'),
72+
],
73+
allowExtras: true,
74+
);
7175
});
7276

7377
testWithoutContext('logs to client when sendLogsToClient=true', () async {
@@ -125,13 +129,17 @@ void main() {
125129

126130
final String output = _uniqueOutputLines(outputEvents);
127131

128-
expectLines(output, <Object>[
129-
'Launching $relativeMainPath on Flutter test device in debug mode...',
130-
'topLevelFunction',
131-
'Application finished.',
132-
'',
133-
startsWith('Exited'),
134-
]);
132+
expectLines(
133+
output,
134+
<Object>[
135+
'Launching $relativeMainPath on Flutter test device in debug mode...',
136+
'topLevelFunction',
137+
'Application finished.',
138+
'',
139+
startsWith('Exited'),
140+
],
141+
allowExtras: true,
142+
);
135143

136144
// If we're running with an out-of-process debug adapter, ensure that its
137145
// own process shuts down after we terminated.
@@ -246,6 +254,7 @@ void main() {
246254
startsWith('Reloaded'),
247255
'topLevelFunction',
248256
],
257+
allowExtras: true,
249258
);
250259

251260
await dap.client.terminate();
@@ -320,6 +329,7 @@ void main() {
320329
startsWith('Restarted application'),
321330
'topLevelFunction',
322331
],
332+
allowExtras: true,
323333
);
324334

325335
await dap.client.terminate();

0 commit comments

Comments
 (0)