Commit 2cba5c66 authored by Andreea Costinas's avatar Andreea Costinas Committed by Commit Bot

cros OOBE: Increase wait for clock sync timeout

On slow networks, |SystemClockSyncWaiter| times-out before tlsdate syncs
the system clock.

This CL increases the time to wait for the system clock updated signal to
45 seconds, which allows tlsdate to try at least seven TCP retransmissions
attempts.

Note that RFC 1122, section 4.2.3.5 recommends at least 100 seconds for
the TCP timeout.

BUG=chromium:540686
TEST=none

Change-Id: Ie0ff1f55ec2fc2c6d4a67f764af39464f411c4b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2214941
Commit-Queue: Andreea-Elena Costinas <acostinas@google.com>
Reviewed-by: default avatarRoman Sorokin [CET] <rsorokin@chromium.org>
Reviewed-by: default avatarPavol Marko <pmarko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771733}
parent 242a3f1e
...@@ -66,9 +66,11 @@ const int kMaxRequestStateKeysTries = 10; ...@@ -66,9 +66,11 @@ const int kMaxRequestStateKeysTries = 10;
constexpr base::TimeDelta kSafeguardTimeout = base::TimeDelta::FromSeconds(90); constexpr base::TimeDelta kSafeguardTimeout = base::TimeDelta::FromSeconds(90);
// Maximum time to wait for time sync before forcing a decision on whether // Maximum time to wait for time sync before forcing a decision on whether
// Initial Enrollment should be performed. // Initial Enrollment should be performed. This corresponds to at least seven
// TCP retransmissions attempts to the remote server used to update the system
// clock.
constexpr base::TimeDelta kSystemClockSyncWaitTimeout = constexpr base::TimeDelta kSystemClockSyncWaitTimeout =
base::TimeDelta::FromSeconds(15); base::TimeDelta::FromSeconds(45);
// A callback that will be invoked when the system clock has been synchronized, // A callback that will be invoked when the system clock has been synchronized,
// or if system clock synchronization has failed. // or if system clock synchronization has failed.
......
...@@ -1818,9 +1818,9 @@ IN_PROC_BROWSER_TEST_F(WizardControllerDeviceStateWithInitialEnrollmentTest, ...@@ -1818,9 +1818,9 @@ IN_PROC_BROWSER_TEST_F(WizardControllerDeviceStateWithInitialEnrollmentTest,
EXPECT_EQ(AutoEnrollmentController::AutoEnrollmentCheckType::kNone, EXPECT_EQ(AutoEnrollmentController::AutoEnrollmentCheckType::kNone,
auto_enrollment_controller()->auto_enrollment_check_type()); auto_enrollment_controller()->auto_enrollment_check_type());
// The timeout is 15 seconds, see |auto_enrollment_controller.cc|. // The timeout is 45 seconds, see |auto_enrollment_controller.cc|.
// Fast-forward by a bit more than that. // Fast-forward by a bit more than that.
task_runner->FastForwardBy(base::TimeDelta::FromSeconds(15 + 1)); task_runner->FastForwardBy(base::TimeDelta::FromSeconds(45 + 1));
EXPECT_EQ(AutoEnrollmentController::AutoEnrollmentCheckType::kNone, EXPECT_EQ(AutoEnrollmentController::AutoEnrollmentCheckType::kNone,
auto_enrollment_controller()->auto_enrollment_check_type()); auto_enrollment_controller()->auto_enrollment_check_type());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment