diff --git a/packages/fuchsia_remote_debug_protocol/examples/drive_todo_list_scroll.dart b/packages/fuchsia_remote_debug_protocol/examples/drive_todo_list_scroll.dart index 04451040bb..bfe954b20a 100644 --- a/packages/fuchsia_remote_debug_protocol/examples/drive_todo_list_scroll.dart +++ b/packages/fuchsia_remote_debug_protocol/examples/drive_todo_list_scroll.dart @@ -22,7 +22,7 @@ import 'package:fuchsia_remote_debug_protocol/logging.dart'; /// /// $ dart examples/driver_todo_list_scroll.dart \ /// fe80::8eae:4cff:fef4:9247 eno1 -Future main(List args) async { +Future main(List args) async { // Log only at info level within the library. If issues arise, this can be // changed to [LoggingLevel.all] or [LoggingLevel.fine] to see more // information. @@ -56,7 +56,7 @@ Future main(List args) async { // Scrolls down 300px. await driver.scroll(find.byType('Scaffold'), 0.0, -300.0, const Duration(milliseconds: 300)); - await Future.delayed(const Duration(milliseconds: 500)); + await Future.delayed(const Duration(milliseconds: 500)); // Scrolls up 300px. await driver.scroll(find.byType('Scaffold'), 300.0, 300.0, const Duration(milliseconds: 300)); diff --git a/packages/fuchsia_remote_debug_protocol/examples/list_vms_and_flutter_views.dart b/packages/fuchsia_remote_debug_protocol/examples/list_vms_and_flutter_views.dart index 6e3ac67b6f..3a4ff2d0d5 100644 --- a/packages/fuchsia_remote_debug_protocol/examples/list_vms_and_flutter_views.dart +++ b/packages/fuchsia_remote_debug_protocol/examples/list_vms_and_flutter_views.dart @@ -18,7 +18,7 @@ import 'package:fuchsia_remote_debug_protocol/logging.dart'; /// /// $ dart examples/list_vms_and_flutter_views.dart \ /// fe80::8eae:4cff:fef4:9247 eno1 -Future main(List args) async { +Future main(List args) async { // Log only at info level within the library. If issues arise, this can be // changed to [LoggingLevel.all] or [LoggingLevel.fine] to see more // information. diff --git a/packages/fuchsia_remote_debug_protocol/lib/src/dart/dart_vm.dart b/packages/fuchsia_remote_debug_protocol/lib/src/dart/dart_vm.dart index 3f81acf679..178ad9ea98 100644 --- a/packages/fuchsia_remote_debug_protocol/lib/src/dart/dart_vm.dart +++ b/packages/fuchsia_remote_debug_protocol/lib/src/dart/dart_vm.dart @@ -55,7 +55,7 @@ Future _waitAndConnect(Uri uri) async { await socket?.close(); if (timer.elapsed < _kConnectTimeout) { _log.info('Attempting to reconnect'); - await Future.delayed(_kReconnectAttemptInterval); + await Future.delayed(_kReconnectAttemptInterval); return attemptConnection(uri); } else { _log.warning('Connection to Fuchsia\'s Dart VM timed out at ' @@ -181,7 +181,7 @@ class DartVm { /// Disconnects from the Dart VM Service. /// /// After this function completes this object is no longer usable. - Future stop() async { + Future stop() async { await _peer?.close(); } } diff --git a/packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart b/packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart index 1fec7cac1b..fba356648f 100644 --- a/packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart +++ b/packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart @@ -135,10 +135,10 @@ class FuchsiaRemoteConnection { await connection._forwardLocalPortsToDeviceServicePorts(); Stream dartVmStream() { - Future listen() async { + Future listen() async { while (connection._pollDartVms) { await connection._pollVms(); - await Future.delayed(_kVmPollInterval); + await Future.delayed(_kVmPollInterval); } connection._dartVmEventController.close(); } @@ -218,7 +218,7 @@ class FuchsiaRemoteConnection { /// Any objects that this class returns (including any child objects from /// those objects) will subsequently have its connection closed as well, so /// behavior for them will be undefined. - Future stop() async { + Future stop() async { for (PortForwarder pf in _forwardedVmServicePorts) { // Closes VM service first to ensure that the connection is closed cleanly // on the target before shutting down the forwarding itself. @@ -369,7 +369,7 @@ class FuchsiaRemoteConnection { final List result = []; // Helper function loop. - Future shutDownPortForwarder(PortForwarder pf) async { + Future shutDownPortForwarder(PortForwarder pf) async { await pf.stop(); _stalePorts.add(pf.remotePort); if (queueEvents) { @@ -432,7 +432,7 @@ class FuchsiaRemoteConnection { /// /// If there are new instances of the Dart VM, then connections will be /// attempted (after clearing out stale connections). - Future _pollVms() async { + Future _pollVms() async { await _checkPorts(); final List servicePorts = await getDeviceServicePorts(); for (int servicePort in servicePorts) { @@ -456,7 +456,7 @@ class FuchsiaRemoteConnection { /// Runs a dummy heartbeat command on all Dart VM instances. /// /// Removes any failing ports from the cache. - Future _checkPorts([bool queueEvents = true]) async { + Future _checkPorts([bool queueEvents = true]) async { // Filters out stale ports after connecting. Ignores results. await _invokeForAllVms>( (DartVm vmService) async { @@ -473,7 +473,7 @@ class FuchsiaRemoteConnection { /// /// When this function is run, all existing forwarded ports and connections /// are reset by way of [stop]. - Future _forwardLocalPortsToDeviceServicePorts() async { + Future _forwardLocalPortsToDeviceServicePorts() async { await stop(); final List servicePorts = await getDeviceServicePorts(); final List forwardedVmServicePorts = @@ -543,7 +543,7 @@ abstract class PortForwarder { int get remotePort; /// Shuts down and cleans up port forwarding. - Future stop(); + Future stop(); } /// Instances of this class represent a running SSH tunnel. @@ -628,7 +628,7 @@ class _SshPortForwarder implements PortForwarder { /// Kills the SSH forwarding command, then to ensure no ports are forwarded, /// runs the SSH 'cancel' command to shut down port forwarding completely. @override - Future stop() async { + Future stop() async { // Cancel the forwarding request. See [start] for commentary about why this // uses the IPv4 loopback. final String formattedForwardingUrl = diff --git a/packages/fuchsia_remote_debug_protocol/test/fuchsia_remote_connection_test.dart b/packages/fuchsia_remote_debug_protocol/test/fuchsia_remote_connection_test.dart index 7d266d36fe..b282f179bf 100644 --- a/packages/fuchsia_remote_debug_protocol/test/fuchsia_remote_connection_test.dart +++ b/packages/fuchsia_remote_debug_protocol/test/fuchsia_remote_connection_test.dart @@ -147,7 +147,7 @@ void main() { }); test('env variable test without remote addr', () async { - Future failingFunction() async { + Future failingFunction() async { await FuchsiaRemoteConnection.connect(); } diff --git a/packages/fuchsia_remote_debug_protocol/test/src/dart/dart_vm_test.dart b/packages/fuchsia_remote_debug_protocol/test/src/dart/dart_vm_test.dart index 9df970f566..31d1d323fe 100644 --- a/packages/fuchsia_remote_debug_protocol/test/src/dart/dart_vm_test.dart +++ b/packages/fuchsia_remote_debug_protocol/test/src/dart/dart_vm_test.dart @@ -199,7 +199,7 @@ void main() { final DartVm vm = await DartVm.connect(Uri.parse('http://whatever.com/ws')); expect(vm, isNot(null)); - Future failingFunction() async { + Future failingFunction() async { await vm.getAllFlutterViews(); } @@ -279,7 +279,7 @@ void main() { final DartVm vm = await DartVm.connect(Uri.parse('http://whatever.com/ws')); expect(vm, isNot(null)); - Future failingFunction() async { + Future failingFunction() async { await vm.getAllFlutterViews(); } @@ -312,7 +312,7 @@ void main() { final DartVm vm = await DartVm.connect(Uri.parse('http://whatever.com/ws')); expect(vm, isNot(null)); - Future failingFunction() async { + Future failingFunction() async { await vm.invokeRpc('somesillyfunction', timeout: timeoutTime); } diff --git a/packages/fuchsia_remote_debug_protocol/test/src/runners/ssh_command_runner_test.dart b/packages/fuchsia_remote_debug_protocol/test/src/runners/ssh_command_runner_test.dart index 29554d7858..46c4fc65cb 100644 --- a/packages/fuchsia_remote_debug_protocol/test/src/runners/ssh_command_runner_test.dart +++ b/packages/fuchsia_remote_debug_protocol/test/src/runners/ssh_command_runner_test.dart @@ -96,7 +96,7 @@ void main() { address: addr); when(mockProcessResult.stdout).thenReturn('whatever'); when(mockProcessResult.exitCode).thenReturn(1); - Future failingFunction() async { + Future failingFunction() async { await runner.run('oihaw'); }