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

Issue 2791793002: [Sync] Fix flaky TwoClientAutofillSyncTest.ConflictingFields. (Closed)

Created:
3 years, 8 months ago by skym
Modified:
3 years, 8 months ago
Reviewers:
pavely
CC:
chromium-reviews, sync-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Sync] Fix flaky TwoClientAutofillSyncTest.ConflictingFields. Reworked how autofill_helper waits for PersonalDataManager. Expecting a single OnPersonalDataChanged was extremely fragile due to race conditions from remote changes being applied, and removing the possibility for race conditions involved increasing the complexity of test cases significantly. Instead, replaced the single expected call by completely removing waits from modifications, and changing the wait on read to post a task to the DB thread and wait for it to be run. While the PersonalDataManager does sometimes cancel these query tasks, this is safe because we block the UI thread which is where the PersonalDataManager operates. Removed obsolete MakeABookmarkChange method. A while back the nudge handler was changed to schedule commits almost immediately for integration tests, which was essentially what MakeABookmarkChange was trying to achieve. Removed unused SyncTest::notifications_enabled_ field, removed AllProfilesMatch() method, and other minor refactoring changes. BUG=701814 Review-Url: https://codereview.chromium.org/2791793002 Cr-Commit-Position: refs/heads/master@{#461889} Committed: https://chromium.googlesource.com/chromium/src/+/fce24c540141bc39ca8aa0b29b4a16debfbdb5d4

Patch Set 1 #

Patch Set 2 : Comment grammar. #

Patch Set 3 : [Sync] Reworked sync tests waiting for PersonalDataManager. #

Patch Set 4 : Updated comment to include a note about PersonalDataManager query cancelation. #

Patch Set 5 : Added duplicate check to ProfilesMatchImpl, added wait to AutofillProfileChecker. #

Patch Set 6 : Self review, converted some for loops to be ranged based. #

Patch Set 7 : Removing refresh/blocking calls on modification methods. #

Total comments: 2

Patch Set 8 : Updated for Pavel's comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -157 lines) Patch
M chrome/browser/sync/test/integration/autofill_helper.h View 1 2 3 4 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/sync/test/integration/autofill_helper.cc View 1 2 3 4 5 6 7 12 chunks +86 lines, -107 lines 0 comments Download
M chrome/browser/sync/test/integration/performance/autofill_sync_perf_test.cc View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/sync/test/integration/sync_test.h View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/sync/test/integration/sync_test.cc View 1 2 3 chunks +0 lines, -3 lines 0 comments Download
M chrome/browser/sync/test/integration/two_client_autofill_sync_test.cc View 1 2 3 4 5 17 chunks +11 lines, -38 lines 0 comments Download

Messages

Total messages: 33 (28 generated)
skym
PTAL
3 years, 8 months ago (2017-04-04 19:42:36 UTC) #25
pavely
lgtm % one nit. https://codereview.chromium.org/2791793002/diff/120001/chrome/browser/sync/test/integration/autofill_helper.cc File chrome/browser/sync/test/integration/autofill_helper.cc (right): https://codereview.chromium.org/2791793002/diff/120001/chrome/browser/sync/test/integration/autofill_helper.cc#newcode341 chrome/browser/sync/test/integration/autofill_helper.cc:341: // a task to the ...
3 years, 8 months ago (2017-04-04 22:32:03 UTC) #26
skym
https://codereview.chromium.org/2791793002/diff/120001/chrome/browser/sync/test/integration/autofill_helper.cc File chrome/browser/sync/test/integration/autofill_helper.cc (right): https://codereview.chromium.org/2791793002/diff/120001/chrome/browser/sync/test/integration/autofill_helper.cc#newcode341 chrome/browser/sync/test/integration/autofill_helper.cc:341: // a task to the DB thread and wait ...
3 years, 8 months ago (2017-04-04 22:37:50 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2791793002/140001
3 years, 8 months ago (2017-04-04 22:38:33 UTC) #30
commit-bot: I haz the power
3 years, 8 months ago (2017-04-04 23:22:33 UTC) #33
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://chromium.googlesource.com/chromium/src/+/fce24c540141bc39ca8aa0b29b4a...

Powered by Google App Engine
This is Rietveld 408576698