Skip to content

Commit

Permalink
Reduce number of resume attempts and delay between attempts.
Browse files Browse the repository at this point in the history
This reduces the number of resume attempts from 20 to 3 (total
4 attempts), and the delay between a failure and the subsequent attempt
from 60 to 20 seconds.  In total, the delay induced due to resume
attempts will not exceed 1 minute.  This appears long enough to overcome
transient connectivity issues such as a user moving between access
points, a temporary Ethernet cable disconnect, or a switch restarting.
It is necessary for reducing the amount of time a user needs to wait in
the case of interrupted network connectivity during OOBE update.

This requires a corresponding fix to unittests, as the assumption on the
number of retries has changed.

BUG=chrome-os-partner:7961
TEST=Passed unittests; verifying OOBE behavior pending at test lab.

Change-Id: I669ac6e2a1264c1d154b23a06c66763f155ab946
Reviewed-on: https://gerrit.chromium.org/gerrit/15639
Reviewed-by: Gilad Arnold <[email protected]>
Tested-by: Gilad Arnold <[email protected]>
Commit-Ready: Gilad Arnold <[email protected]>
  • Loading branch information
Gilad Arnold authored and Gerrit committed Feb 10, 2012
1 parent 58e8b1f commit 34bf1ee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions http_fetcher_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ namespace {

const int kBigLength = 100000;
const int kMediumLength = 1000;
const int kFlakyTruncateLength = 9000;
const int kFlakySleepEvery = 7;
const int kFlakyTruncateLength = 29000;
const int kFlakySleepEvery = 3;
const int kFlakySleepSecs = 10;

} // namespace
Expand Down
2 changes: 1 addition & 1 deletion libcurl_http_fetcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ using std::string;
namespace chromeos_update_engine {

namespace {
const int kMaxRetriesCount = 20;
const int kMaxRetriesCount = 3;
const int kNoNetworkRetrySeconds = 10;
const char kCACertificatesPath[] = "/usr/share/chromeos-ca-certificates";
} // namespace {}
Expand Down
2 changes: 1 addition & 1 deletion libcurl_http_fetcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class LibcurlHttpFetcher : public HttpFetcher {
download_length_(0),
resume_offset_(0),
retry_count_(0),
retry_seconds_(60),
retry_seconds_(20),
no_network_retry_count_(0),
no_network_max_retries_(0),
idle_seconds_(1),
Expand Down

0 comments on commit 34bf1ee

Please sign in to comment.