Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Unified Diff: build/android/devil/android/device_utils.py

Issue 1340603002: DeviceUtils: Make Install and PushChangedFiles respect instance retries / timeout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: min->max Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/devil/android/decorators_test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/devil/android/device_utils.py
diff --git a/build/android/devil/android/device_utils.py b/build/android/devil/android/device_utils.py
index d372b6303380e96247626bec4e1dede3e427f3a2..9801fd82532e784905a068e2b066490fe8dfa73c 100644
--- a/build/android/devil/android/device_utils.py
+++ b/build/android/devil/android/device_utils.py
@@ -484,11 +484,9 @@ class DeviceUtils(object):
timeout_retry.WaitFor(wifi_enabled)
REBOOT_DEFAULT_TIMEOUT = 10 * _DEFAULT_TIMEOUT
- REBOOT_DEFAULT_RETRIES = _DEFAULT_RETRIES
- @decorators.WithTimeoutAndRetriesDefaults(
- REBOOT_DEFAULT_TIMEOUT,
- REBOOT_DEFAULT_RETRIES)
+ @decorators.WithTimeoutAndRetriesFromInstance(
+ min_default_timeout=REBOOT_DEFAULT_TIMEOUT)
def Reboot(self, block=True, wifi=False, timeout=None, retries=None):
"""Reboot the device.
@@ -513,11 +511,9 @@ class DeviceUtils(object):
self.WaitUntilFullyBooted(wifi=wifi)
INSTALL_DEFAULT_TIMEOUT = 4 * _DEFAULT_TIMEOUT
- INSTALL_DEFAULT_RETRIES = _DEFAULT_RETRIES
- @decorators.WithTimeoutAndRetriesDefaults(
- INSTALL_DEFAULT_TIMEOUT,
- INSTALL_DEFAULT_RETRIES)
+ @decorators.WithTimeoutAndRetriesFromInstance(
+ min_default_timeout=INSTALL_DEFAULT_TIMEOUT)
def Install(self, apk_path, reinstall=False, permissions=None, timeout=None,
retries=None):
"""Install an APK.
@@ -540,9 +536,8 @@ class DeviceUtils(object):
self._InstallInternal(apk_path, None, reinstall=reinstall,
permissions=permissions)
- @decorators.WithTimeoutAndRetriesDefaults(
- INSTALL_DEFAULT_TIMEOUT,
- INSTALL_DEFAULT_RETRIES)
+ @decorators.WithTimeoutAndRetriesFromInstance(
+ min_default_timeout=INSTALL_DEFAULT_TIMEOUT)
def InstallSplitApk(self, base_apk, split_apks, reinstall=False,
allow_cached_props=False, permissions=None, timeout=None,
retries=None):
@@ -1027,11 +1022,9 @@ class DeviceUtils(object):
check_return=True)
PUSH_CHANGED_FILES_DEFAULT_TIMEOUT = 10 * _DEFAULT_TIMEOUT
- PUSH_CHANGED_FILES_DEFAULT_RETRIES = _DEFAULT_RETRIES
- @decorators.WithTimeoutAndRetriesDefaults(
- PUSH_CHANGED_FILES_DEFAULT_TIMEOUT,
- PUSH_CHANGED_FILES_DEFAULT_RETRIES)
+ @decorators.WithTimeoutAndRetriesFromInstance(
+ min_default_timeout=PUSH_CHANGED_FILES_DEFAULT_TIMEOUT)
def PushChangedFiles(self, host_device_tuples, timeout=None,
retries=None, delete_device_stale=False):
"""Push files to the device, skipping files that don't need updating.
« no previous file with comments | « build/android/devil/android/decorators_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698