diff options
Diffstat (limited to 'sync/engine/backoff_delay_provider_unittest.cc')
-rw-r--r-- | sync/engine/backoff_delay_provider_unittest.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sync/engine/backoff_delay_provider_unittest.cc b/sync/engine/backoff_delay_provider_unittest.cc index 1bf17cb..2e58186 100644 --- a/sync/engine/backoff_delay_provider_unittest.cc +++ b/sync/engine/backoff_delay_provider_unittest.cc @@ -57,6 +57,10 @@ TEST_F(BackoffDelayProviderTest, GetInitialDelay) { EXPECT_EQ(kInitialBackoffRetrySeconds, delay->GetInitialDelay(state).InSeconds()); + state.last_download_updates_result = DATATYPE_TRIGGERED_RETRY; + EXPECT_EQ(kInitialBackoffImmediateRetrySeconds, + delay->GetInitialDelay(state).InSeconds()); + state.last_download_updates_result = SYNCER_OK; // Note that updating credentials triggers a canary job, trumping // the initial delay, but in theory we still expect this function to treat @@ -99,6 +103,10 @@ TEST_F(BackoffDelayProviderTest, GetInitialDelayWithOverride) { EXPECT_EQ(kInitialBackoffShortRetrySeconds, delay->GetInitialDelay(state).InSeconds()); + state.last_download_updates_result = DATATYPE_TRIGGERED_RETRY; + EXPECT_EQ(kInitialBackoffImmediateRetrySeconds, + delay->GetInitialDelay(state).InSeconds()); + state.last_download_updates_result = SYNCER_OK; // Note that updating credentials triggers a canary job, trumping // the initial delay, but in theory we still expect this function to treat |