diff --git a/lib/src/run.dart b/lib/src/run.dart index 86ef66fe..1d45619f 100644 --- a/lib/src/run.dart +++ b/lib/src/run.dart @@ -346,11 +346,13 @@ Future runProcessTests( Future shutdownSimulator(String deviceId) async { cmd('xcrun', ['simctl', 'shutdown', deviceId]); // shutdown apparently needs time when restarting + // see https://github.com/flutter/flutter/issues/10228 for race condition on simulator await Future.delayed(Duration(milliseconds: 2000)); } Future startSimulator(DaemonClient daemonClient, String deviceId) async { cmd('xcrun', ['simctl', 'boot', deviceId]); + await Future.delayed(Duration(milliseconds: 2000)); await waitForEmulatorToStart(daemonClient, deviceId); }