Revert "Improve the _wait_for_update_to_fail function."
This reverts commit 3b5f6edd5393a9e0c8e0f6cc50d81b0552a50be2.
Reason for revert: The old timer was needed in the backoff tests which have started to fail since this change.
Original change's description:
> Improve the _wait_for_update_to_fail function.
>
> Reduce time the test waits for an update to timeout.
> Provide the update status at timeout.
>
> BUG=None
> TEST=None
>
> Change-Id: Ieb33825e4f6f11c455d3c35d27197e5d965d3e04
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/1960556
> Tested-by: David Haddock <dhaddock@chromium.org>
> Reviewed-by: Amin Hassani <ahassani@chromium.org>
> Commit-Queue: David Haddock <dhaddock@chromium.org>
Bug: None
Change-Id: I5bd5f219c29ec595bf09e90d45a7d28666e13379
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/2009089
Reviewed-by: David Haddock <dhaddock@chromium.org>
Commit-Queue: David Haddock <dhaddock@chromium.org>
Tested-by: David Haddock <dhaddock@chromium.org>
diff --git a/client/cros/update_engine/update_engine_util.py b/client/cros/update_engine/update_engine_util.py
index 74e3a9f..2684715 100644
--- a/client/cros/update_engine/update_engine_util.py
+++ b/client/cros/update_engine/update_engine_util.py
@@ -121,7 +121,7 @@
def _wait_for_update_to_fail(self):
"""Waits for the update to retry until failure."""
- timeout_minutes = 8
+ timeout_minutes = 20
timeout = time.time() + 60 * timeout_minutes
while True:
if self._check_update_engine_log_for_entry('Reached max attempts ',
@@ -132,11 +132,8 @@
time.sleep(1)
self._get_update_engine_status()
if time.time() > timeout:
- err_msg = ('Update did not fail as expected. Timeout: %d '
- 'minutes. Last update status: %s') % (
- timeout_minutes, self._get_update_engine_status()[
- self._CURRENT_OP])
- raise error.TestFail(err_msg)
+ raise error.TestFail('Update did not fail as expected. Timeout'
+ ': %d minutes.' % timeout_minutes)
def _wait_for_update_to_complete(self, finalizing_ok=False):