[flutter_tools] remove await runZonedGuarded() in tests (#142336)

For context https://github.com/flutter/flutter/issues/142338
This commit is contained in:
Christopher Fujino 2024-01-26 13:58:03 -08:00 committed by GitHub
parent e1785b315b
commit 97fef98b47
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2130,10 +2130,10 @@ flutter:
vmServiceUris: Stream<Uri>.value(testUri),
);
final Completer<void> done = Completer<void>();
await runZonedGuarded(
unawaited(runZonedGuarded(
() => flutterDevice.connect(allowExistingDdsInstance: true).then((_) => done.complete()),
(_, __) => done.complete(),
);
));
await done.future;
expect(device.dds.uri, Uri.parse('http://localhost/existingDdsInField'));
}, overrides: <Type, Generator>{
@ -2164,10 +2164,10 @@ flutter:
vmServiceUris: Stream<Uri>.value(testUri),
);
final Completer<void>done = Completer<void>();
await runZonedGuarded(
unawaited(runZonedGuarded(
() => flutterDevice.connect(allowExistingDdsInstance: true).then((_) => done.complete()),
(_, __) => done.complete(),
);
));
await done.future;
expect(device.dds.uri, Uri.parse('http://localhost/existingDdsInMessage'));
}, overrides: <Type, Generator>{