New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 700839 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
No longer actively working on Chrom...
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 2
Type: Bug



Sign in to add a comment

Test failing on official devices

Project Member Reported by gambard@chromium.org, Mar 13 2017

Issue description

SettingsTestCase.testBreakpadReporting
SettingsTestCase.testBreakpadReportingFirstLaunc
SettingsTestCase.testMetricsReporting
FirstRunTestCase.testTermsAndConditions
Have been failing on official builds for 11 days.
 
Can you provide links or pastes from the failure?
FirstRunTestCase.testTermsAndConditions is different than the others. It's just that the test expects Chromium branding.

For the SettingsTestCases, I am still investigating, btu they are all calling  -(void)assertsMetricsPrefsForService:(MetricsServiceType)serviceType

In there:
// Split here:  Official build vs. Development build.
// Official builds allow recording and uploading of data, honoring the
// metrics prefs.  Development builds should never record or upload data.
#if defined(GOOGLE_CHROME_BUILD)

So I'll investigate more in that direction.
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/973aa79155460a0ff6e7c36452ab18dd9c4ec960

commit 973aa79155460a0ff6e7c36452ab18dd9c4ec960
Author: lpromero <lpromero@chromium.org>
Date: Mon Mar 13 18:27:58 2017

Fix FirstRunTestCase.testTermsAndConditions on official

The test expected Chromium branded, which failed on Official builds.

BUG=  700814  
R=kkhorimoto@chromium.org
TBR=gambard@chromium.org

Review-Url: https://codereview.chromium.org/2745123002
Cr-Commit-Position: refs/heads/master@{#456437}

[modify] https://crrev.com/973aa79155460a0ff6e7c36452ab18dd9c4ec960/ios/chrome/browser/ui/first_run/first_run_egtest.mm

Project Member

Comment 5 by bugdroid1@chromium.org, Mar 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/502a0b3e580685f93a0319f433bcf150ddb6806d

commit 502a0b3e580685f93a0319f433bcf150ddb6806d
Author: lpromero <lpromero@chromium.org>
Date: Fri Mar 24 18:05:31 2017

Fix SettingsTestCase.testBreakpadReportingFirstLaunch on Official

Breakpad sets its state with dispatch_async:
https://cs.chromium.org/chromium/src/breakpad/src/client/ios/BreakpadController.mm?sq=package:chromium&dr&l=174
In EarlGrey tests, wait for the state to be consistent before
proceeding.

BUG= 700839 
R=olivierrobin@chromium.org

Review-Url: https://codereview.chromium.org/2760973002
Cr-Commit-Position: refs/heads/master@{#459474}

[modify] https://crrev.com/502a0b3e580685f93a0319f433bcf150ddb6806d/ios/chrome/browser/ui/settings/settings_egtest.mm

Status: Fixed (was: Assigned)
Status: Started (was: Assigned)
https://codereview.chromium.org/2775403003/
Project Member

Comment 9 by bugdroid1@chromium.org, Mar 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4e751ec73a63ac0600f1b3fa758a864cc29da52b

commit 4e751ec73a63ac0600f1b3fa758a864cc29da52b
Author: lpromero <lpromero@chromium.org>
Date: Tue Mar 28 14:19:52 2017

Wait for WWAN state to propagate to Breakpad in EG tests

The issue is that SetWWANStateTo calls ultimately to an asynchronous
method in Breakpad (-setUploadingEnabled:). So we need to wait for the
propagation before asserting behaviors and state.

BUG= 700839 
R=olivierrobin@google.com

Review-Url: https://codereview.chromium.org/2775403003
Cr-Commit-Position: refs/heads/master@{#460095}

[modify] https://crrev.com/4e751ec73a63ac0600f1b3fa758a864cc29da52b/ios/chrome/browser/ui/settings/settings_egtest.mm

Should cycle green for these tests next time.
Still fails on canary
Anything else we can try to do to fix these tests?
I haven't had time to look at it again, but I am kind of out of ideas.
The issue is that there is still a race condition, even after the drainUntilIdle. Which makes sense.

https://codereview.chromium.org/2827313002 uses the breakpad controller queue to dispatch a barrier block to create a "wait" method, to wait for the BreakpadController to finish updating its state before proceeding.
Thanks for digging into this!
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



I will verify on tomorrow's official builds.
Status: Fixed (was: Started)
Cycled green! Finally :)
Labels: Merge-TBD
[Auto-generated comment by a script] We noticed that this issue is targeted for M-59; it appears the fix may have landed after branch point, meaning a merge might be required. Please confirm if a merge is required here - if so add Merge-Request-59 label, otherwise remove Merge-TBD label. Thanks.
Labels: -Merge-TBD Merge-Request-59
This would turn beta-device green.
Project Member

Comment 20 by sheriffbot@chromium.org, Apr 21 2017

Labels: -Merge-Request-59 Hotlist-Merge-Approved Merge-Approved-59
Your change meets the bar and is auto-approved for M59. Please go ahead and merge the CL to branch 3071 manually. Please contact milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), gkihumba@(ChromeOS), Abdul Syed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 21 by bugdroid1@chromium.org, Apr 21 2017

Labels: -merge-approved-59 merge-merged-3071
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/20d59625dac84ed76c03f45b49a1f3979e5f9be1

commit 20d59625dac84ed76c03f45b49a1f3979e5f9be1
Author: Louis Romero <lpromero@google.com>
Date: Fri Apr 21 10:30:04 2017

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}
(cherry picked from commit 5895ccc48d4395a1b5359a6ca8ca9eb654d4cd3d)

Review-Url: https://codereview.chromium.org/2837483003 .
Cr-Commit-Position: refs/branch-heads/3071@{#119}
Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641}

[modify] https://crrev.com/20d59625dac84ed76c03f45b49a1f3979e5f9be1/ios/chrome/browser/ui/settings/settings_egtest.mm
[modify] https://crrev.com/20d59625dac84ed76c03f45b49a1f3979e5f9be1/ios/chrome/test/app/chrome_test_util.h
[modify] https://crrev.com/20d59625dac84ed76c03f45b49a1f3979e5f9be1/ios/chrome/test/app/chrome_test_util.mm

Sign in to add a comment