[flutter_tools] remove mocks from android emulator tests (#81548)

This commit is contained in:
Jonah Williams
2021-04-30 17:39:03 -07:00
committed by GitHub
parent 3a0abac742
commit d4e48a1537
3 changed files with 65 additions and 62 deletions

View File

@@ -149,7 +149,7 @@ class AndroidEmulator extends Emulator {
String _prop(String name) => _properties != null ? _properties[name] : null;
@override
Future<void> launch() async {
Future<void> launch({@visibleForTesting Duration startupDuration}) async {
final Process process = await _processUtils.start(
<String>[_androidSdk.emulatorPath, '-avd', id],
);
@@ -200,7 +200,7 @@ class AndroidEmulator extends Emulator {
}));
// Wait a few seconds for the emulator to start.
await Future<void>.delayed(const Duration(seconds: 3));
await Future<void>.delayed(startupDuration ?? const Duration(seconds: 3));
earlyFailure = false;
return;
}