Descriptionsync: 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)
|