Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Issue 2729573004: Fix TaskSchedulerWorkerPoolHistogramTest.NumTasksBeforeDetach (Closed)

Created:
3 years, 9 months ago by robliao
Modified:
3 years, 9 months ago
Reviewers:
fdoray, gab
CC:
chromium-reviews, gab+watch_chromium.org, robliao+watch_chromium.org, fdoray+watch_chromium.org, vmpstr+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix TaskSchedulerWorkerPoolHistogramTest.NumTasksBeforeDetach This fix passes the pointer for the PlatformThreadRef to the task for comparisons and actually gets the PlatformThreadRef from PlatformThread::CurrentRef(). Previously, the test would race and pass by value. This meant that if the previous task did not complete in time, it would pass the empty reference. Since we were accidentally comparing against that, then the test succeeded. When code ran slowly enough to set the value before the next PostTask, then we would have the correct PlatformThreadRef, but incorrectly compare it to the empty PlatformThreadRef, correctly failing the test. It's amazing that the tests passed in the first place! BUG=697697, 698046 Review-Url: https://codereview.chromium.org/2729573004 Cr-Commit-Position: refs/heads/master@{#456558} Committed: https://chromium.googlesource.com/chromium/src/+/404de72480129c6549041267a171a9b0f1f8189f

Patch Set 1 #

Patch Set 2 : Add Assertions Against Null PlatformThreadRefs #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -7 lines) Patch
M base/task_scheduler/scheduler_worker_pool_impl_unittest.cc View 1 4 chunks +12 lines, -7 lines 2 comments Download

Messages

Total messages: 25 (18 generated)
robliao
3 years, 9 months ago (2017-03-03 07:45:26 UTC) #2
fdoray
lgtm
3 years, 9 months ago (2017-03-13 21:29:07 UTC) #11
robliao
Added some assertions againsts null PlatformThreadRefs
3 years, 9 months ago (2017-03-13 22:18:14 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2729573004/20001
3 years, 9 months ago (2017-03-13 23:46:56 UTC) #19
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/404de72480129c6549041267a171a9b0f1f8189f
3 years, 9 months ago (2017-03-14 02:23:04 UTC) #22
gab
lgtm % nit https://codereview.chromium.org/2729573004/diff/20001/base/task_scheduler/scheduler_worker_pool_impl_unittest.cc File base/task_scheduler/scheduler_worker_pool_impl_unittest.cc (right): https://codereview.chromium.org/2729573004/diff/20001/base/task_scheduler/scheduler_worker_pool_impl_unittest.cc#newcode722 base/task_scheduler/scheduler_worker_pool_impl_unittest.cc:722: // TODO(crbug.com/698046): disabled due to flakyness. ...
3 years, 9 months ago (2017-03-15 19:23:11 UTC) #23
robliao
3 years, 9 months ago (2017-03-15 20:05:55 UTC) #25
Message was sent while issue was closed.
https://codereview.chromium.org/2729573004/diff/20001/base/task_scheduler/sch...
File base/task_scheduler/scheduler_worker_pool_impl_unittest.cc (right):

https://codereview.chromium.org/2729573004/diff/20001/base/task_scheduler/sch...
base/task_scheduler/scheduler_worker_pool_impl_unittest.cc:722: //
TODO(crbug.com/698046): disabled due to flakyness.
On 2017/03/15 19:23:11, gab wrote:
> rm comment

Done in https://codereview.chromium.org/2750103004/

Powered by Google App Engine
This is Rietveld 408576698