New issue
Advanced search Search tips

Issue 892883 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Oct 9
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 1
Type: Bug



Sign in to add a comment

DownloadManagerTestCase tests are flaky on iOS 12.

Project Member Reported by michaeldo@chromium.org, Oct 6

Issue description

Multiple tests in the DownloadManagerTestCase are flaky on iOS 12 on https://uberchromegw.corp.google.com/i/internal.bling.main/builders/ios12-beta-simulator. 

This appears to have began at run #2247 and by the log it looks like the Download button cannot be found. (I was unable to reproduce this failure locally.)

Example failure:
 ios_chrome_ui_egtests (iPhone 5s iOS 12.0) ios_chrome_ui_egtests (iPhone 5s iOS 12.0)
Run on OS: 'Mac'
Shard duration: 0:39:01.987942 ( 13 secs )
stdout cache history
json.output cache history
swarming.summary cache history
Merge script log cache history
test_summary.json cache history
DownloadManagerTestCase/testAccessibilityOnCompletedDownloadToolbar cache history
DownloadManagerTestCase/testCancellingDownload cache history
DownloadManagerTestCase/testSucessfullDownload cache history
passed tests cache history
DownloadManagerTestCase/testDownloadWhileBrowsing cache history
DownloadManagerTestCase/testAccessibilityOnNotStartedDownloadToolbar cache history
shard #0 (failed)
test data

Example log failure:
../../ios/chrome/browser/ui/download/download_manager_egtest.mm:182: error: -[DownloadManagerTestCase testAccessibilityOnCompletedDownloadToolbar] : Exception: NoMatchingElementException
Exception Name: NoMatchingElementException
Exception Reason: Cannot find UI element.
Exception with Action: {
  "Action Name":  "Tap",
  "Element Matcher":  "(((respondsToSelector(isAccessibilityElement) && isAccessibilityElement) && accessibilityLabel('Download')) && ((respondsToSelector(isAccessibilityElement) && isAccessibilityElement) && accessibilityTraits: UIAccessibilityTraitButton))",
  "Recovery Suggestion":  "Check if the element exists in the UI hierarchy printed below. If it exists, adjust the matcher so that it accurately matches element."
}
Exception Details: Error Trace: [
  {
    "Description":  "Interaction cannot continue because the desired element was not found.",
    "Error Domain":  "com.google.earlgrey.ElementInteractionErrorDomain",
    "Error Code":  "0",
    "File Name":  "GREYElementInteraction.m",
    "Function Name":  "-[GREYElementInteraction matchedElementsWithTimeout:error:]",
    "Line":  "124",
    "TestCase Class":  "DownloadManagerTestCase",
    "TestCase Method":  "testAccessibilityOnCompletedDownloadToolbar"
  }
]
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 6

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

commit 8719721ac93a5adb79ab82f96d5ea1466d2c96af
Author: Mike Dougherty <michaeldo@chromium.org>
Date: Sat Oct 06 06:08:32 2018

Mark DownloadManagerTestCase tests as flaky.

TBR=eugenebut@chromium.org

Bug:  892883 
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Change-Id: Idd01581265d46e17f2812c1456ebe93f0d521389
Reviewed-on: https://chromium-review.googlesource.com/c/1266879
Reviewed-by: Mike Dougherty <michaeldo@chromium.org>
Commit-Queue: Mike Dougherty <michaeldo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597415}
[modify] https://crrev.com/8719721ac93a5adb79ab82f96d5ea1466d2c96af/ios/chrome/browser/ui/download/download_manager_egtest.mm

Components: UI>Browser>Downloads
Mike, do you remember which roll started the flakiness? 
Project Member

Comment 3 by bugdroid1@chromium.org, Oct 8

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

commit f6379e5aca3b6f489b5eae4660f57fe186929ec8
Author: Eugene But <eugenebut@chromium.org>
Date: Mon Oct 08 16:08:47 2018

Fix Download Manager tests flakyness.

Wait until Download button is shown up before tapping it. The timeout for
the button should be the same as page load timeout, because the button
is shown when the server responds.

Bug:  892883 
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Change-Id: I9cc3b687a9ff8029f411e8eee02689719f1ac0ca
Reviewed-on: https://chromium-review.googlesource.com/c/1267347
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597575}
[modify] https://crrev.com/f6379e5aca3b6f489b5eae4660f57fe186929ec8/ios/chrome/browser/ui/download/download_manager_egtest.mm

Project Member

Comment 4 by bugdroid1@chromium.org, Oct 8

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

commit 0fd89f302a35a86c19550fb5cf92ca531ae12e3a
Author: Eugene But <eugenebut@chromium.org>
Date: Mon Oct 08 17:16:23 2018

Revert "Mark DownloadManagerTestCase tests as flaky."

This reverts commit 8719721ac93a5adb79ab82f96d5ea1466d2c96af.

Reason for revert: These tests were not flaky on iOS 10 and 11.
Flakiness on iOS 12 should be fixed in crrev.com/c/1267347

If flakiness persist on iOS 12 we should disable the tests only for iOS 12. 

Original change's description:
> Mark DownloadManagerTestCase tests as flaky.
> 
> TBR=eugenebut@chromium.org
> 
> Bug:  892883 
> Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
> Change-Id: Idd01581265d46e17f2812c1456ebe93f0d521389
> Reviewed-on: https://chromium-review.googlesource.com/c/1266879
> Reviewed-by: Mike Dougherty <michaeldo@chromium.org>
> Commit-Queue: Mike Dougherty <michaeldo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#597415}

TBR=michaeldo@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug:  892883 
Change-Id: I90a84f0606e1a97b96a27475c5b810828b37756e
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Reviewed-on: https://chromium-review.googlesource.com/c/1268677
Reviewed-by: Eugene But <eugenebut@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597592}
[modify] https://crrev.com/0fd89f302a35a86c19550fb5cf92ca531ae12e3a/ios/chrome/browser/ui/download/download_manager_egtest.mm

Status: Fixed (was: Assigned)
Status: Verified (was: Fixed)
Verified the issue on the build version 72.0.3582.0 canary tested on iPad Pro iOS 12,iPhone 7+ iOS 12 and iPhone 5 SE iOS 12. 

Download manager works fine while downloading the file with out any flakiness, works fine

Sign in to add a comment