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

Issue 148723002: [sync] Eliminate Await*SyncCompletion methods in integration tests (Closed)

Created:
6 years, 11 months ago by Raghu Simha
Modified:
6 years, 10 months ago
Reviewers:
rlarocque
CC:
chromium-reviews, tim+watch_chromium.org, extensions-reviews_chromium.org, haitaol+watch_chromium.org, chromium-apps-reviews_chromium.org, rsimha+watch_chromium.org, maniscalco+watch_chromium.org
Visibility:
Public.

Description

[sync] Eliminate Await*SyncCompletion methods in integration tests For the longest time, the sync integration tests have relied on methods that wait for sync cycle completion by polling various internal fields in the sync session snapshot. These methods are brittle and rely on internal state, which is not ideal. This cl is a first step towards eliminating the use of internal state to detect sync completion. It does the following: 1) Removes the methods IsDataSynced, IsFullySynced, IsDataSyncedImpl, AwaitDataSyncCompletion and AwaitFullSyncCompletion 2) Adds a method AwaitSyncSetupCompletion which waits until a client is ready to push local changes to the server. 3) Adds a method AwaitCommitActivityCompletion which waits until a client no longer has data to commit and its progress markers are updated. 4) Updates call sites to use the new methods. BUG=94990, 97780, 323380 TEST=sync_integration_tests R=rlarocque@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=247599

Patch Set 1 : #

Total comments: 6

Patch Set 2 : Remove AwaitSteadyState #

Total comments: 6

Patch Set 3 : Address feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+136 lines, -267 lines) Patch
M chrome/browser/sync/test/integration/cross_platform_sync_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/test/integration/migration_test.cc View 1 3 chunks +8 lines, -10 lines 0 comments Download
M chrome/browser/sync/test/integration/performance/sync_timing_helper.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/test/integration/profile_sync_service_harness.h View 1 2 5 chunks +11 lines, -31 lines 0 comments Download
M chrome/browser/sync/test/integration/profile_sync_service_harness.cc View 1 2 20 chunks +51 lines, -160 lines 0 comments Download
M chrome/browser/sync/test/integration/single_client_app_list_sync_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/test/integration/single_client_apps_sync_test.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/sync/test/integration/single_client_bookmarks_sync_test.cc View 7 chunks +8 lines, -8 lines 0 comments Download
M chrome/browser/sync/test/integration/single_client_dictionary_sync_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/test/integration/single_client_extensions_sync_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/test/integration/single_client_passwords_sync_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/test/integration/single_client_preferences_sync_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/test/integration/single_client_search_engines_sync_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/test/integration/single_client_themes_sync_test.cc View 3 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/sync/test/integration/single_client_typed_urls_sync_test.cc View 4 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/sync/test/integration/sync_auth_test.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/test/integration/sync_errors_test.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/sync/test/integration/sync_exponential_backoff_test.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/sync/test/integration/two_client_app_list_sync_test.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/test/integration/two_client_apps_sync_test.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/test/integration/two_client_autofill_sync_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/sync/test/integration/two_client_dictionary_sync_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/test/integration/two_client_extensions_sync_test.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc View 6 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/test/integration/two_client_search_engines_sync_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/test/integration/two_client_themes_sync_test.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/test/integration/two_client_typed_urls_sync_test.cc View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Raghu Simha
Richard, please review. Thanks.
6 years, 10 months ago (2014-01-27 23:56:20 UTC) #1
rlarocque
Here are some comments. Stopping now because it's late. I'll take another look tomorrow morning. ...
6 years, 10 months ago (2014-01-28 02:50:47 UTC) #2
Raghu Simha
Here are responses to your initial comments. Updated CL coming up. https://codereview.chromium.org/148723002/diff/80002/chrome/browser/sync/test/integration/profile_sync_service_harness.cc File chrome/browser/sync/test/integration/profile_sync_service_harness.cc (right): ...
6 years, 10 months ago (2014-01-28 21:13:11 UTC) #3
Raghu Simha
Richard, I've uploaded a new patch set for review. PTAL.
6 years, 10 months ago (2014-01-28 21:50:47 UTC) #4
rlarocque
I think I'm getting a better idea of what this patch includes now. The idea ...
6 years, 10 months ago (2014-01-28 23:08:28 UTC) #5
Raghu Simha
Richard, PTAL. On 2014/01/28 23:08:28, rlarocque wrote: > I think I'm getting a better idea ...
6 years, 10 months ago (2014-01-29 00:28:43 UTC) #6
rlarocque
I think you're right about IsDataSynced() and comparing progress markers. It turns out that IsDataSynced() ...
6 years, 10 months ago (2014-01-29 00:58:12 UTC) #7
Raghu Simha
6 years, 10 months ago (2014-01-29 02:35:16 UTC) #8
Message was sent while issue was closed.
Committed patchset #3 manually as r247599 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698