ScopedTaskEnvironmentTest.DelayedTasks test is inherently flaky |
|||||
Issue descriptionSince build https://ci.chromium.org/buildbot/chromium.fyi/Fuchsia/11718, various of the variants of this test have been flaking, e.g: [ RUN ] MainThreadMockTime/ScopedTaskEnvironmentTest.DelayedTasks/0 ../../base/test/scoped_task_environment_unittest.cc:195: Failure Expected: expected_value Which is: 0 To be equal to: counter Which is: 2 [ FAILED ] MainThreadMockTime/ScopedTaskEnvironmentTest.DelayedTasks/0, where GetParam() = 4-byte object <01-00 00-00> (51 ms) or [ RUN ] MainThreadDefault/ScopedTaskEnvironmentTest.DelayedTasks/0 ../../base/test/scoped_task_environment_unittest.cc:195: Failure Expected: expected_value Which is: 0 To be equal to: counter Which is: 2 [ FAILED ] MainThreadDefault/ScopedTaskEnvironmentTest.DelayedTasks/0, where GetParam() = 4-byte object <00-00 00-00> (59 ms) or [ RUN ] MainThreadIO/ScopedTaskEnvironmentTest.DelayedTasks/0 ../../base/test/scoped_task_environment_unittest.cc:195: Failure Expected: expected_value Which is: 0 To be equal to: counter Which is: 2 [ FAILED ] MainThreadIO/ScopedTaskEnvironmentTest.DelayedTasks/0, where GetParam() = 4-byte object <03-00 00-00> (46 ms) etc All the failures involve an |expected_value| of zero, but a |counter| value of two. There are no obvious culprits in the blame list for https://ci.chromium.org/buildbot/chromium.fyi/Fuchsia/11718 though.
,
Nov 29 2017
,
Nov 29 2017
Thanks for filing, hadn't had a chance to look into this yet. It's been happening for a while, at least as far back as https://build.chromium.org/p/chromium.fyi/builders/Fuchsia/builds/11473 so perhaps https://chromium-review.googlesource.com/638550 based on that blamelist. If not it might be worth looking at other recent CLs in the bug linked there.
,
Dec 2 2017
Re #3: The failing test was indeed added in https://chromium-review.googlesource.com/638550. Looking at the test implementation, it sets up an asynchronous ScopedTaskEnvironment with "async" execution mode, but then seems to expect that work passed to PostTask() won't be executed until RunUntilIdle().
,
Dec 2 2017
,
Dec 2 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f63253ce95cedeeac95cad6951545b872872e229 commit f63253ce95cedeeac95cad6951545b872872e229 Author: Wez <wez@chromium.org> Date: Sat Dec 02 22:22:41 2017 Fix ScopedTaskEnvironmentTest.DelayedTasks to not be racey. The test created an ASYNC-mode ScopedTaskEnvironment, but then applied expectations to it that are only valid in QUEUED (synchronous) mode. The test is fixed to use a QUEUED-mode instance. A brief delay is also added to the test, to make it more likely to fail if the behaviour regresses to being asynchronous & racey. Bug: 789712 TBR: gab Change-Id: I73808b1633bd7afcb6e0204a4030e16ef323f868 Reviewed-on: https://chromium-review.googlesource.com/804691 Reviewed-by: Wez <wez@chromium.org> Commit-Queue: Wez <wez@chromium.org> Cr-Commit-Position: refs/heads/master@{#521221} [modify] https://crrev.com/f63253ce95cedeeac95cad6951545b872872e229/base/test/scoped_task_environment_unittest.cc
,
Dec 3 2017
,
Dec 4 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e7e2294286d78156b3f21bdbaf50eb69d79f820c commit e7e2294286d78156b3f21bdbaf50eb69d79f820c Author: Wez <wez@chromium.org> Date: Mon Dec 04 20:34:07 2017 Tweak ScopedTaskEnvironmentTest comments as per code-review requests. Bug: 789712 TBR: gab Change-Id: I16e059c18420a56e875c5564015531177bc213d3 Reviewed-on: https://chromium-review.googlesource.com/806815 Reviewed-by: Gabriel Charette <gab@chromium.org> Reviewed-by: François Doray <fdoray@chromium.org> Commit-Queue: Gabriel Charette <gab@chromium.org> Cr-Commit-Position: refs/heads/master@{#521434} [modify] https://crrev.com/e7e2294286d78156b3f21bdbaf50eb69d79f820c/base/test/scoped_task_environment_unittest.cc |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by w...@chromium.org
, Nov 29 2017