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

Issue 184993006: sync: Change progress marker checking in tests (Closed)

Created:
6 years, 9 months ago by rlarocque
Modified:
6 years, 9 months ago
CC:
chromium-reviews, tim+watch_chromium.org, haitaol+watch_chromium.org, maniscalco+watch_chromium.org
Visibility:
Public.

Description

sync: Change progress marker checking in tests Introduces two new StatusChangeCheckers: UpdatedProgressMarkerChecker and QuiesceStatusChangeChecker. The first, UpdatedProgressMarkerChecker, is a simple checker for ensuring progress markers are "fully synced". It's a bit flaky, but no flakier than the functions that preceded it. The second, QuiesceStatusChangeChecker, is intended to be a replacement for AwaitQuiescence and many other Await* methods. The logic is different, but the heuristic used is essentially the same. We want to wait until all clients pass the 'HasLatestProgressMarkers()' check, then make sure that their progress markers match each other. The new implementation is a bit simpler, since it takes advantage of the transitive properties of equality rather than doing O(N^2) comparisons. The QuiesceStatusChangeChecker is made more complicated by the fact that the HasLatestProgressMarkers() is not very reliable. This becomes a problem in practice if we call that function on some "Profile A" in response to an event that happened in "Profile B". So the naive implementation of QuiesceStatusChangeChecker won't work. The implementation in this CL uses a system of observers to make the calls to HasLatestProgressMarker() safer. It's an ugly hack, but IMHO no uglier than the existing set of hacks. BUG=323380 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255525

Patch Set 1 #

Patch Set 2 : More hacks #

Patch Set 3 : Clean up #

Total comments: 6

Patch Set 4 : Review fixes #

Messages

Total messages: 9 (0 generated)
rlarocque
Here's some more integration test refactoring. I'm hoping this will be the last dangerous change; ...
6 years, 9 months ago (2014-03-04 01:56:18 UTC) #1
tim (not reviewing)
LGTM with nits https://codereview.chromium.org/184993006/diff/40001/chrome/browser/sync/test/integration/quiesce_status_change_checker.cc File chrome/browser/sync/test/integration/quiesce_status_change_checker.cc (right): https://codereview.chromium.org/184993006/diff/40001/chrome/browser/sync/test/integration/quiesce_status_change_checker.cc#newcode1 chrome/browser/sync/test/integration/quiesce_status_change_checker.cc:1: // Copyright (c) 2014 The Chromium ...
6 years, 9 months ago (2014-03-06 18:03:45 UTC) #2
rlarocque
https://codereview.chromium.org/184993006/diff/40001/chrome/browser/sync/test/integration/quiesce_status_change_checker.cc File chrome/browser/sync/test/integration/quiesce_status_change_checker.cc (right): https://codereview.chromium.org/184993006/diff/40001/chrome/browser/sync/test/integration/quiesce_status_change_checker.cc#newcode134 chrome/browser/sync/test/integration/quiesce_status_change_checker.cc:134: has_latest_progress_markers_ = On 2014/03/06 18:03:46, timsteele wrote: > 'latest' ...
6 years, 9 months ago (2014-03-06 18:12:21 UTC) #3
tim (not reviewing)
On 2014/03/06 18:12:21, rlarocque wrote: > https://codereview.chromium.org/184993006/diff/40001/chrome/browser/sync/test/integration/quiesce_status_change_checker.cc > File chrome/browser/sync/test/integration/quiesce_status_change_checker.cc > (right): > > https://codereview.chromium.org/184993006/diff/40001/chrome/browser/sync/test/integration/quiesce_status_change_checker.cc#newcode134 ...
6 years, 9 months ago (2014-03-06 18:43:27 UTC) #4
rlarocque
On 2014/03/06 18:43:27, timsteele wrote: > On 2014/03/06 18:12:21, rlarocque wrote: > > > https://codereview.chromium.org/184993006/diff/40001/chrome/browser/sync/test/integration/quiesce_status_change_checker.cc ...
6 years, 9 months ago (2014-03-06 19:23:19 UTC) #5
tim (not reviewing)
On 2014/03/06 19:23:19, rlarocque wrote: > On 2014/03/06 18:43:27, timsteele wrote: > > On 2014/03/06 ...
6 years, 9 months ago (2014-03-06 22:44:06 UTC) #6
rlarocque
The CQ bit was checked by rlarocque@chromium.org
6 years, 9 months ago (2014-03-06 22:54:01 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/184993006/60001
6 years, 9 months ago (2014-03-06 23:03:57 UTC) #8
commit-bot: I haz the power
6 years, 9 months ago (2014-03-07 04:28:58 UTC) #9
Message was sent while issue was closed.
Change committed as 255525

Powered by Google App Engine
This is Rietveld 408576698