Decrease device discovery timeout from 10 to 5 seconds (#69266)

This commit is contained in:
Jenn Magder 2020-10-28 19:43:19 -07:00 committed by GitHub
parent 46b1b67797
commit 13896b3bd1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -636,7 +636,7 @@ class IosDeviceDiscovery implements DeviceDiscovery {
Future<List<String>> discoverDevices() async {
final List<dynamic> results = json.decode(await eval(
path.join(flutterDirectory.path, 'bin', 'flutter'),
<String>['devices', '--machine', '--suppress-analytics', '--device-timeout', '10'],
<String>['devices', '--machine', '--suppress-analytics', '--device-timeout', '5'],
)) as List<dynamic>;
// [

View file

@ -434,7 +434,7 @@ Future<String> eval(
List<String> flutterCommandArgs(String command, List<String> options) {
// Commands support the --device-timeout flag.
final List<String> supportedDeviceTimeoutCommands = <String>[
final Set<String> supportedDeviceTimeoutCommands = <String>{
'attach',
'devices',
'drive',
@ -442,13 +442,13 @@ List<String> flutterCommandArgs(String command, List<String> options) {
'logs',
'run',
'screenshot',
];
};
return <String>[
command,
if (deviceOperatingSystem == DeviceOperatingSystem.ios && supportedDeviceTimeoutCommands.contains(command))
...<String>[
'--device-timeout',
'10',
'5',
],
if (localEngine != null) ...<String>['--local-engine', localEngine],
if (localEngineSrcPath != null) ...<String>['--local-engine-src-path', localEngineSrcPath],

View file

@ -771,7 +771,7 @@ class PerfTestWithSkSL extends PerfTest {
'run',
if (deviceOperatingSystem == DeviceOperatingSystem.ios)
...<String>[
'--device-timeout', '10',
'--device-timeout', '5',
],
'--verbose',
'--verbose-system-logs',