New issue
Advanced search Search tips

Issue 842027 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

AppListPresenterDelegateHomeLauncherTest.BackgroundOpacity is flaky

Project Member Reported by jamescook@chromium.org, May 11 2018

Issue description

Build linux-chromeos (target_os="chromeos") with these gn args:

dcheck_always_on = true
is_debug = false
is_component_build = true
target_os = "chromeos"
use_goma = true
enable_nacl = false
is_chrome_branded = true

testing/xvfb.py out/Default/ash_unittests

[287/2459] AppListPresenterDelegateTest.DragToBezelClosesAppListFromFullscreenAndPeeking/1 (139 ms)
[288/2459] AppListPresenterDelegateTest.FlingDownClosesAppListFromFullscreenAndPeeking/0 (79 ms)
[289/2459] AppListPresenterDelegateTest.FlingDownClosesAppListFromFullscreenAndPeeking/1 (96 ms)
[290/2459] AppListPresenterDelegateTest.LongUpwardDragInFullscreenShouldNotClose/0 (294 ms)
[291/2459] AppListPresenterDelegateTest.LongUpwardDragInFullscreenShouldNotClose/1 (379 ms)
[292/2459] AppListPresenterDelegateHomeLauncherTest.ShowAppListForTabletMode (136 ms)
[293/2459] AppListPresenterDelegateHomeLauncherTest.ParentWindowContainer (113 ms)
[ RUN      ] AppListPresenterDelegateHomeLauncherTest.BackgroundOpacity
../../ash/app_list/app_list_presenter_delegate_unittest.cc:1062: Failure
Expected equality of these values:
  0.7f
    Which is: 0.7
  background_layer->opacity()
    Which is: 0.95
Stack trace:
#0 0x000000bebb4c testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop()
#1 0x000000beb529 testing::internal::AssertHelper::operator=()
#2 0x0000005e7f6a ash::AppListPresenterDelegateHomeLauncherTest_BackgroundOpacity_Test::TestBody()

[  FAILED  ] AppListPresenterDelegateHomeLauncherTest.BackgroundOpacity (195 ms)
[294/2459] AppListPresenterDelegateHomeLauncherTest.BackgroundOpacity (195 ms)
[ RUN      ] AppListPresenterDelegateHomeLauncherTest.BackgroundBlur
../../ash/app_list/app_list_presenter_delegate_unittest.cc:1075: Failure
Expected: (background_layer->background_blur()) > (0.0f), actual: 0 vs 0
Stack trace:
#0 0x000000bebb4c testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop()
#1 0x000000beb529 testing::internal::AssertHelper::operator=()
#2 0x0000005e830f ash::AppListPresenterDelegateHomeLauncherTest_BackgroundBlur_Test::TestBody()

[  FAILED  ] AppListPresenterDelegateHomeLauncherTest.BackgroundBlur (143 ms)

They succeed on retry.

The tests were added a few weeks ago in https://chromium-review.googlesource.com/c/chromium/src/+/1022710

This is annoying, since it slows down my runs of ash_unittests (retries are slow). It also means they might get flaky on the bots. I wonder if something is leaking state between the tests.
 

Comment 1 by xiy...@chromium.org, May 11 2018

0.95 is the bg opacity of when background blur is NOT enabled. Could it be some other code path races to call features::IsBackgroundBlurEnabled() before scoped_feature_list_.InitWithFeatures gets called?

Also the comment in L1058 looks wrong. It says 95% opacity but test checks against 0.7.
Status: Started (was: Assigned)
Running the test individually never fails, so it might be the value of blur flag in previous tests that affects the test results. Removing the static variable here [1] would fix this issue.

[1] https://cs.chromium.org/chromium/src/ash/public/cpp/app_list/app_list_features.cc?type=cs&q=kEnableBackgroundBlur&sq=package:chromium&l=31
Project Member

Comment 3 by bugdroid1@chromium.org, May 11 2018

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

commit e09fad69e00d42d54ebcf6706c163f163672dbfd
Author: Weidong Guo <weidongg@chromium.org>
Date: Fri May 11 19:16:23 2018

Fix home launcher flaky test

AppListPresenterDelegateHomeLauncherTest.BackgroundOpacity and
BackgroundBlur are flaky because IsBackgroundBlurEnabled() saves
feature flag in static variable.

Changes:
Remove static variable.

BUG= 842027 

Change-Id: I26c056ee72bac8490ca8a7b0b2555b90594b4980
Reviewed-on: https://chromium-review.googlesource.com/1055793
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Weidong Guo <weidongg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557972}
[modify] https://crrev.com/e09fad69e00d42d54ebcf6706c163f163672dbfd/ash/app_list/app_list_presenter_delegate_unittest.cc
[modify] https://crrev.com/e09fad69e00d42d54ebcf6706c163f163672dbfd/ash/public/cpp/app_list/app_list_features.cc

Status: Fixed (was: Started)

Sign in to add a comment