bluetooth: Increase wait for resume timeout

Use a separate, internal timeout for wait for resume to catch reboots
and problems with connectivity. Otherwise tests fail with errno 111 and
don't show the actual reason for failure.

BUG=b:157510203
TEST=Ran bluetooth_AdapterSRSanity

Change-Id: Icd12bdaf65ade7e889cb007868aaa484383b7cdb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/2269491
Tested-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Commit-Queue: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Reviewed-by: Daniel Winkler <danielwinkler@google.com>
Reviewed-by: Shijin Abraham <shijinabraham@google.com>
diff --git a/server/cros/bluetooth/bluetooth_adapter_tests.py b/server/cros/bluetooth/bluetooth_adapter_tests.py
index 204f9e6..43ff79d 100644
--- a/server/cros/bluetooth/bluetooth_adapter_tests.py
+++ b/server/cros/bluetooth/bluetooth_adapter_tests.py
@@ -574,6 +574,7 @@
     SUSPEND_TIME_SECS=10
     SUSPEND_ENTER_SECS=10
     RESUME_TIME_SECS=30
+    RESUME_INTERNAL_TIMEOUT_SECS = 180
 
     # Minimum RSSI required for peer devices during testing
     MIN_RSSI = -70
@@ -3552,8 +3553,11 @@
         resume_timeout = resume_timeout + RESUME_DELTA
         try:
             start = datetime.now()
+
+            # Wait for resume needs to wait longer in case device rebooted.
+            # Otherwise, the test will fail with errno 111 (connection refused)
             self.host.test_wait_for_resume(
-                boot_id, resume_timeout=resume_timeout)
+                boot_id, resume_timeout=self.RESUME_INTERNAL_TIMEOUT_SECS)
 
             # As of now, a timeout in test_wait_for_resume doesn't raise. Force
             # a failure here instead by checking against the start time.