From a8d97a6dc9930d3ad2a99c8366e7b7276c2d458d Mon Sep 17 00:00:00 2001 From: Florian Loitsch Date: Thu, 28 Jun 2018 14:35:08 +0200 Subject: [PATCH] Wait before running the second test. (#18826) --- dev/devicelab/bin/tasks/flutter_attach_test.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dev/devicelab/bin/tasks/flutter_attach_test.dart b/dev/devicelab/bin/tasks/flutter_attach_test.dart index 95a82200e8a..09e203d92e1 100644 --- a/dev/devicelab/bin/tasks/flutter_attach_test.dart +++ b/dev/devicelab/bin/tasks/flutter_attach_test.dart @@ -117,6 +117,11 @@ void main() { await device.shellExec('am', ['start', '-n', kActivityId]); }); + // Give the device the time to really shut down the app. + await new Future.delayed(const Duration(milliseconds: 200)); + // After the delay, force-stopping it shouldn't do anything, but doesn't hurt. + await device.shellExec('am', ['force-stop', kAppId]); + final String currentTime = (await device.shellEval('date', ['"+%F %R:%S.000"'])).trim(); print('Start time on device: $currentTime'); section('Launching app');