Skip to content

Commit

Permalink
Adding a wait for device ready before deleting packages. (flutter#3167)
Browse files Browse the repository at this point in the history
Adding an additional wait, since we experienced a package manager not ready error.

Bug:flutter/flutter#135035

*Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.*

*List which issues are fixed by this PR. You must list at least one issue.*

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
  • Loading branch information
yusuf-goog authored Oct 16, 2023
1 parent 954e559 commit 093aa56
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cipd_packages/device_doctor/lib/src/android_device.dart
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,8 @@ class AndroidDevice implements Device {
processManager ??= LocalProcessManager();
final int timeoutSecs = 60;
print('Device recovery: deleting package caches...');
await eval('adb', <String>['wait-for-device'], canFail: false, processManager: processManager)
.timeout(Duration(seconds: timeoutSecs));
await deletePackageCache();
await eval('adb', <String>['wait-for-device'], canFail: false, processManager: processManager)
.timeout(Duration(seconds: timeoutSecs));
Expand Down

0 comments on commit 093aa56

Please sign in to comment.