New issue
Advanced search Search tips

Issue 751236 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Closed: Aug 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

TrayUpdateTest.VisibilityAfterUpdateOverCellularAvailable is flaky when run locally

Project Member Reported by jamescook@chromium.org, Aug 1 2017

Issue description

Run this:
testing/xvfb.py out/Default/ash_unittests

Usually it fails the first time then passes on retry.

[ RUN      ] TrayUpdateTest.VisibilityAfterUpdateOverCellularAvailable
../../ash/system/update/tray_update_unittest.cc:64: Failure
Value of: tray_update->tray_view()->visible()
  Actual: true
Expected: false
../../ash/system/update/tray_update_unittest.cc:76: Failure
      Expected: "Click to view update details"
To be equal to: base::UTF16ToUTF8(label)
      Which is: "Restart to update Adobe Flash Player"
[  FAILED  ] TrayUpdateTest.VisibilityAfterUpdateOverCellularAvailable (57 ms)

I wonder if there is some static variable or command line flag that is not being reset between test runs.

 
I could not repro this, but I think it is possible that these five static variables [1] are not reset before each test.

[1] https://cs.chromium.org/chromium/src/ash/system/update/tray_update.cc?gsn=SetUpdateOverCellularAvailableIconVisible&l=58-67
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 3 2017

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

commit ff9b4cf80ffc5530c350c3b9b77fd10dd3f60000
Author: Weidong Guo <weidongg@chromium.org>
Date: Thu Aug 03 02:31:41 2017

Fix TrayUpdateTest flaky

Changes:
1. Add TrayUpdate::ResetForTesting to reset everything in TrayUpdate
before testing to prevent effect from previous testing.

BUG= 751236 
TEST=TrayUpdateTest.*

Change-Id: I85e2641d50448d656b64592dd025efd481428594
Reviewed-on: https://chromium-review.googlesource.com/596523
Commit-Queue: Weidong Guo <weidongg@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491621}
[modify] https://crrev.com/ff9b4cf80ffc5530c350c3b9b77fd10dd3f60000/ash/system/update/tray_update.cc
[modify] https://crrev.com/ff9b4cf80ffc5530c350c3b9b77fd10dd3f60000/ash/system/update/tray_update.h
[modify] https://crrev.com/ff9b4cf80ffc5530c350c3b9b77fd10dd3f60000/ash/system/update/tray_update_unittest.cc

Status: Fixed (was: Assigned)

Comment 4 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment