Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2662)

Unified Diff: chrome/browser/sync_file_system/drive_backend/conflict_resolver_unittest.cc

Issue 446793002: [SyncFS] Unconditionally demote remote file trackers on remote-to-local sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync_file_system/drive_backend/conflict_resolver_unittest.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/conflict_resolver_unittest.cc b/chrome/browser/sync_file_system/drive_backend/conflict_resolver_unittest.cc
index b43cb1f6ac6af5a047df284bd0b2ee9ef78f72b6..d0d4c0f9c94981d1c3c01ed201d8f00fdeb85f60 100644
--- a/chrome/browser/sync_file_system/drive_backend/conflict_resolver_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend/conflict_resolver_unittest.cc
@@ -209,9 +209,18 @@ class ConflictResolverTest : public testing::Test {
}
void RunRemoteToLocalSyncerUntilIdle() {
- SyncStatusCode status = SYNC_STATUS_UNKNOWN;
- while (status != SYNC_STATUS_NO_CHANGE_TO_SYNC)
+ const int kRetryLimit = 100;
+ SyncStatusCode status;
+ int retry_count = 0;
+ MetadataDatabase* metadata_database = context_->GetMetadataDatabase();
+ do {
+ if (retry_count++ > kRetryLimit)
+ break;
status = RunRemoteToLocalSyncer();
+ } while (status == SYNC_STATUS_OK ||
+ status == SYNC_STATUS_RETRY ||
+ metadata_database->PromoteLowerPriorityTrackersToNormal());
+ EXPECT_EQ(SYNC_STATUS_NO_CHANGE_TO_SYNC, status);
}
SyncStatusCode RunConflictResolver() {
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698