Commit 281a320f authored by Sergiy Byelozyorov's avatar Sergiy Byelozyorov Committed by Commit Bot

Revert "[tools] Re-land: Add retries when trying to discover the device"

This reverts commit f401cd4b.

Reason for revert: did not help

Original change's description:
> [tools] Re-land: Add retries when trying to discover the device
> 
> This is an experimental change that may help mitigate the issue.
> 
> TBR=machenbach@chromium.org
> 
> No-Try: true
> No-Tree-Checks: true
> Bug: chromium:893593
> Change-Id: Idf15a63006c2c7ba2c31482e5103b2a0b1d64510
> Reviewed-on: https://chromium-review.googlesource.com/c/1339401
> Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
> Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57558}

TBR=machenbach@chromium.org,sergiyb@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: chromium:893593
Change-Id: I30c529a627d1e6fa52099939c5c209110e9d0eb9
Reviewed-on: https://chromium-review.googlesource.com/c/1342931Reviewed-by: 's avatarSergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57650}
parent e64f7c0a
......@@ -9,7 +9,6 @@ Wrapper around the Android device abstraction from src/build/android.
import logging
import os
import sys
import time
BASE_DIR = os.path.normpath(
......@@ -51,14 +50,8 @@ class _Driver(object):
devil_chromium.Initialize()
if not device:
# Detect attached device if not specified. Retry 3 times with 60 second
# sleep in-between.
for _ in range(3):
devices = adb_wrapper.AdbWrapper.Devices()
if devices:
break
logging.warning('Failed to detect device. Will retry in 60 secs...')
time.sleep(60)
# Detect attached device if not specified.
devices = adb_wrapper.AdbWrapper.Devices()
assert devices, 'No devices detected'
assert len(devices) == 1, 'Multiple devices detected.'
device = str(devices[0])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment