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

Issue 2827313002: Replace drainUntilIdle with a dispatch_barrier_sync for Breakpad tests (Closed)

Created:
3 years, 8 months ago by lpromero
Modified:
3 years, 8 months ago
Reviewers:
baxley
CC:
chromium-reviews, ios-reviews+chrome_chromium.org, ios-reviews_chromium.org, baxley+watch_chromium.org, pkl (ping after 24h if needed), noyau+watch_chromium.org, marq+watch_chromium.org, huangml+watch_chromium.org, liaoyuke+watch_chromium.org, sdefresne+watch_chromium.org, olivierrobin_chromium.or
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Replace drainUntilIdle with a dispatch_barrier_sync for Breakpad tests drainUntilIdle was a crutch because it didn't fully eliminate the race condition between Breakpad setting its state on its own queue and the tests. This CL adds a test method to get the BreakpadController queue and dispatches a barrier block on it to wait until the BreakpadController updated its state. Previously: https://codereview.chromium.org/2760973002/ https://codereview.chromium.org/2775403003/ BUG=700839 R=baxley@chromium.org CC=olivierrobin@chromium.or Review-Url: https://codereview.chromium.org/2827313002 Cr-Commit-Position: refs/heads/master@{#466065} Committed: https://chromium.googlesource.com/chromium/src/+/5895ccc48d4395a1b5359a6ca8ca9eb654d4cd3d

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -9 lines) Patch
M ios/chrome/browser/ui/settings/settings_egtest.mm View 2 chunks +3 lines, -3 lines 0 comments Download
M ios/chrome/test/app/chrome_test_util.h View 1 chunk +9 lines, -6 lines 0 comments Download
M ios/chrome/test/app/chrome_test_util.mm View 3 chunks +10 lines, -0 lines 1 comment Download

Messages

Total messages: 13 (7 generated)
lpromero
3 years, 8 months ago (2017-04-20 15:23:03 UTC) #1
baxley
LGTM https://codereview.chromium.org/2827313002/diff/1/ios/chrome/test/app/chrome_test_util.mm File ios/chrome/test/app/chrome_test_util.mm (right): https://codereview.chromium.org/2827313002/diff/1/ios/chrome/test/app/chrome_test_util.mm#newcode34 ios/chrome/test/app/chrome_test_util.mm:34: - (dispatch_queue_t)queue; Probably outside the scope of this ...
3 years, 8 months ago (2017-04-20 16:37:43 UTC) #6
lpromero
On 2017/04/20 16:37:43, baxley wrote: > LGTM > > https://codereview.chromium.org/2827313002/diff/1/ios/chrome/test/app/chrome_test_util.mm > File ios/chrome/test/app/chrome_test_util.mm (right): > ...
3 years, 8 months ago (2017-04-20 17:51:01 UTC) #7
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/2827313002/1
3 years, 8 months ago (2017-04-20 17:51:46 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://chromium.googlesource.com/chromium/src/+/5895ccc48d4395a1b5359a6ca8ca9eb654d4cd3d
3 years, 8 months ago (2017-04-20 17:58:11 UTC) #12
baxley
3 years, 8 months ago (2017-04-20 18:01:57 UTC) #13
Message was sent while issue was closed.
On 2017/04/20 17:51:01, lpromero wrote:
> On 2017/04/20 16:37:43, baxley wrote:
> > LGTM
> > 
> >
>
https://codereview.chromium.org/2827313002/diff/1/ios/chrome/test/app/chrome_...
> > File ios/chrome/test/app/chrome_test_util.mm (right):
> > 
> >
>
https://codereview.chromium.org/2827313002/diff/1/ios/chrome/test/app/chrome_...
> > ios/chrome/test/app/chrome_test_util.mm:34: - (dispatch_queue_t)queue;
> > Probably outside the scope of this CL... Do you have any thoughts on public
> APIs
> > we could use to achieve something similar? Or perhaps things we could make
> > public APIs?
> 
> Either BreakpadController vends its queue (bad), or it takes it as a
dependency
> injected on initialization (better). But then we need the creator of the
> BreakpadController to also vend the queue!

Yeah, I didn't mean exposing the queue (which is what I didn't like in the test
code :)). Just curious if there was something higher level, but since we've
already exposed breakpad privates I don't think we're introducing anything worse
than what's already there. :(

Thanks for the fix and explanation.

Powered by Google App Engine
This is Rietveld 408576698