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

Unified Diff: devil/devil/android/sdk/adb_wrapper_devicetest.py

Issue 2808763004: [devil] Raise DeviceUnreachableError on device not found (Closed)
Patch Set: match specific device Created 3 years, 8 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 | « devil/devil/android/sdk/adb_wrapper.py ('k') | devil/devil/android/tools/device_recovery.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: devil/devil/android/sdk/adb_wrapper_devicetest.py
diff --git a/devil/devil/android/sdk/adb_wrapper_devicetest.py b/devil/devil/android/sdk/adb_wrapper_devicetest.py
index d97d56a1a2f9e83051b6b2fea0344ff165a3ba83..0d7faf6cc4d1c8f884b311b0894df5456e110b16 100755
--- a/devil/devil/android/sdk/adb_wrapper_devicetest.py
+++ b/devil/devil/android/sdk/adb_wrapper_devicetest.py
@@ -38,6 +38,11 @@ class TestAdbWrapper(device_test_case.DeviceTestCase):
f.write(contents)
return path
+ def testDeviceUnreachable(self):
+ with self.assertRaises(device_errors.DeviceUnreachableError):
+ bad_adb = adb_wrapper.AdbWrapper('device_gone')
+ bad_adb.Shell('echo test')
+
def testShell(self):
output = self._adb.Shell('echo test', expect_status=0)
self.assertEqual(output.strip(), 'test')
@@ -109,7 +114,7 @@ class TestAdbWrapper(device_test_case.DeviceTestCase):
try:
self._adb.Shell('start')
break
- except device_errors.AdbCommandFailedError:
+ except device_errors.DeviceUnreachableError:
time.sleep(1)
self._adb.Remount()
« no previous file with comments | « devil/devil/android/sdk/adb_wrapper.py ('k') | devil/devil/android/tools/device_recovery.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698