Unverified Commit 13896b3b authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

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

parent 46b1b677
...@@ -636,7 +636,7 @@ class IosDeviceDiscovery implements DeviceDiscovery { ...@@ -636,7 +636,7 @@ class IosDeviceDiscovery implements DeviceDiscovery {
Future<List<String>> discoverDevices() async { Future<List<String>> discoverDevices() async {
final List<dynamic> results = json.decode(await eval( final List<dynamic> results = json.decode(await eval(
path.join(flutterDirectory.path, 'bin', 'flutter'), 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>; )) as List<dynamic>;
// [ // [
......
...@@ -434,7 +434,7 @@ Future<String> eval( ...@@ -434,7 +434,7 @@ Future<String> eval(
List<String> flutterCommandArgs(String command, List<String> options) { List<String> flutterCommandArgs(String command, List<String> options) {
// Commands support the --device-timeout flag. // Commands support the --device-timeout flag.
final List<String> supportedDeviceTimeoutCommands = <String>[ final Set<String> supportedDeviceTimeoutCommands = <String>{
'attach', 'attach',
'devices', 'devices',
'drive', 'drive',
...@@ -442,13 +442,13 @@ List<String> flutterCommandArgs(String command, List<String> options) { ...@@ -442,13 +442,13 @@ List<String> flutterCommandArgs(String command, List<String> options) {
'logs', 'logs',
'run', 'run',
'screenshot', 'screenshot',
]; };
return <String>[ return <String>[
command, command,
if (deviceOperatingSystem == DeviceOperatingSystem.ios && supportedDeviceTimeoutCommands.contains(command)) if (deviceOperatingSystem == DeviceOperatingSystem.ios && supportedDeviceTimeoutCommands.contains(command))
...<String>[ ...<String>[
'--device-timeout', '--device-timeout',
'10', '5',
], ],
if (localEngine != null) ...<String>['--local-engine', localEngine], if (localEngine != null) ...<String>['--local-engine', localEngine],
if (localEngineSrcPath != null) ...<String>['--local-engine-src-path', localEngineSrcPath], if (localEngineSrcPath != null) ...<String>['--local-engine-src-path', localEngineSrcPath],
......
...@@ -771,7 +771,7 @@ class PerfTestWithSkSL extends PerfTest { ...@@ -771,7 +771,7 @@ class PerfTestWithSkSL extends PerfTest {
'run', 'run',
if (deviceOperatingSystem == DeviceOperatingSystem.ios) if (deviceOperatingSystem == DeviceOperatingSystem.ios)
...<String>[ ...<String>[
'--device-timeout', '10', '--device-timeout', '5',
], ],
'--verbose', '--verbose',
'--verbose-system-logs', '--verbose-system-logs',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment