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() |