Increase remote powerwash failsafe timeout
Increase the failsafe timeout for remote powerwash to 10 seconds. This will increase the chances of a device to send an ACK back to the server and mark the command as successful. BUG=chromium:1211861 TEST=None Change-Id: I38b79171070c4de19320f798fe296071bc993b75 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2912780 Reviewed-by: Bartosz Fabianowski <bartfab@chromium.org> Commit-Queue: Victor-Gabriel Savu <vsavu@google.com> Cr-Commit-Position: refs/heads/master@{#889684}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
d2fe13481e
commit
d0e29fda23
chrome/browser/chromeos/policy/remote_commands
@ -27,7 +27,7 @@ constexpr base::TimeDelta kRemotePowerwashCommandExpirationTime =
|
||||
// The time that we wait for the server to get the ACK, if that passes we
|
||||
// immediately start the powerwash process.
|
||||
constexpr base::TimeDelta kFailsafeTimerTimeout =
|
||||
base::TimeDelta::FromSeconds(1);
|
||||
base::TimeDelta::FromSeconds(10);
|
||||
|
||||
void StartPowerwash(enterprise_management::SignedData signed_command) {
|
||||
chromeos::SessionManagerClient::Get()->StartRemoteDeviceWipe(signed_command);
|
||||
|
@ -160,13 +160,13 @@ TEST_F(DeviceCommandRemotePowerwashJobTest, TestFailsafeTimerStartsPowerwash) {
|
||||
run_loop_.QuitClosure()));
|
||||
run_loop_.Run();
|
||||
|
||||
// After 500ms the timer is not run yet.
|
||||
task_runner_->FastForwardBy(base::TimeDelta::FromMilliseconds(500));
|
||||
// After 5s the timer is not run yet.
|
||||
task_runner_->FastForwardBy(base::TimeDelta::FromSeconds(5));
|
||||
EXPECT_EQ(0, chromeos::FakeSessionManagerClient::Get()
|
||||
->start_device_wipe_call_count());
|
||||
|
||||
// After 1s the timer is run.
|
||||
task_runner_->FastForwardBy(base::TimeDelta::FromMilliseconds(500));
|
||||
// After 10s the timer is run.
|
||||
task_runner_->FastForwardBy(base::TimeDelta::FromSeconds(5));
|
||||
EXPECT_EQ(1, chromeos::FakeSessionManagerClient::Get()
|
||||
->start_device_wipe_call_count());
|
||||
}
|
||||
|
Reference in New Issue
Block a user